- scss是什么
CSS is the styling language that any browser understands to style webpages.
SCSS is a special type of file for SASS, a program written in Ruby that assembles CSS style sheets for a browser, and for information SASS adds lots of additional functionality to CSS like variables, nesting and more which can make writing CSS easier and faster. SCSS files are processed by the server running a web app to output a traditional CSS that your browser can understand.
例子 :
1 2 3 4 5 6 7 8 9 10 11 12 |
$color: #ffffff; $width: 800px; @mixin body{ width: $width; color: $color; content{ width: $width; background:$color; } } |
- webpack 是什么
大致是一个编译打包工具
- 怎么加入 css
一种方法
1 2 3 |
<head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> |
如果样式表简单, 直接写在 head 里
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<head> <style> body { background-color: lightblue; } h1 { color: white; text-align: center; } p { font-family: verdana; font-size: 20px; } </style> </head> |
还有inline css
1 |
<h1 style="color:blue;text-align:center;"> |
padding , margin , etc
css 模板站 : https://templated.co