如果添加带引号的字符串(在+运算符之前指定)和未带引号的字符串,则结果将显示在带引号的字符串中。
如果您添加一个带引号的字符串(在+运算符之前指定),则结果将以不带引号的字符串显示。
@mixin string-concat { &:after { content: "My favorite language is " + Sass; font: Arial + " sans-serif"; } } h2 { @include string-concat; }
h2:after { content: "My favorite language is Sass"; font: Arial sans-serif; }
h2 { color: #468499 + #204479; }
h2 { color: #66c8ff; }
46+20=66 (red color), 84+44=c8 (green color), and 99+79=ff (blue color)