Sass Operators
本文最后更新于:2021年2月21日 下午
Sass Operators
Doing math in your CSS is very helpful. Sass has a handful of standard math operators like +
, -
, *
, /
, and %
. In our example we’re going to do some simple math to calculate widths for an aside
& article
.
SCSS SYNTAX
1 |
|
CSS OUTPUT
1 |
|
We’ve created a very simple fluid grid, based on 960px. Operations in Sass let us do something like take pixel values and convert them to percentages without much hassle.
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!