我找不到有关使用 zen 编码添加 CSS 属性的语法。也许我忽略了禅宗备忘单。
例如,如何缩短以下内容:
<div style="background-color: red; float: right;"></div>
这是有关 zen 编码方式的 css 属性的完整文档
看到这个
您的上述 html 代码将如下所示:
编辑 :
div[style=background-color:red;float:right;]
div.red_fl_right
会给它CSS可以定义的类。从那里,您可以在 CSS 文件中编写:
red_fl_right{
bg
fl:r
}
两行展开后,可以在bg值上加上“red”;