CSS3中content的用法是什么
content 属性与 :before 及 :after 伪元素配合使用,来插入内容。
语法如下:
content: normal|none|counter|attr|string|open-quote|close-quote|no-open-quote|no-close-quote|url|initial|inherit;
其中:
示例如下:
<html> <head> <meta charset="utf-8"> <title>123</title> <style> p:before { content:"好好学习,"; } </style> </head> <body> <p>天天向上</p> </body> </html>
输出结果:
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)