CSS 有时候也需要字符串,比如
:before, :after 中的 content
对于特殊字符,要使用反斜杠+unicode 代码
比如
h1 {
font-size: 18px;
color: #1687E2;
line-height: 1.6em;
font-weight: normal;
}
h1:before {
content: "\00A7.";
margin-right: 0.5em;
}
效果:h1 {
font-size: 18px;
color: #1687E2;
line-height: 1.6em;
font-weight: normal;
}
h1:before {
content: "\00A7.";
margin-right: 0.5em;
}
效果:
0 comments:
Post a Comment