💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
[CSS参考手册](http://css.doyoe.com/)»[属性列表](#)»[内容属性](#)» 相关内容: [**其它内容属性参考**选择其它项](#) - [content](#) - [counter-increment](#) - [counter-reset](#) - [quotes](#) # content - **版本:CSS2** - 继承性:无 ### 语法: **content**:normal | none | [[<attr>](#) | [<url>](#) | [<string>](#) | counter(name) | counter(name,list-style-type) | counters(name,string) | counters(name,string,list-style-type) | no-close-quote | no-open-quote | close-quote | open-quote]+ **默认值**:normal ### 取值: normal:默认值。表现与none值相同none:不生成任何值。[<attr>](#):插入标签属性值[<url>](#):使用指定的绝对或相对地址插入一个外部资源(图像,声频,视频或浏览器支持的其他任何资源)[<string>](#):插入字符串counter(name):使用已命名的计数器counter(name,list-style-type):使用已命名的计数器并遵从指定的list-style-type属性counters(name,string):使用所有已命名的计数器counters(name,string,list-style-type):使用所有已命名的计数器并遵从指定的list-style-type属性no-close-quote:并不插入quotes属性的后标记。但增加其嵌套级别no-open-quote:并不插入quotes属性的前标记。但减少其嵌套级别close-quote:插入quotes属性的后标记open-quote:插入quotes属性的前标记 ### 说明: **用来和[:after](#)及[:before](#)伪元素一起使用,在对象前或后显示内容。** - 对应的脚本特性为**content**。 ### 兼容性: - 浅绿 = 支持 - 红色 = 不支持 - 墨绿 = 部分支持 - 橙色 = 实验性质 <table class="gdataform"><thead><tr><th><a href="#browser" title="查看本文档测试时所用浏览器版本">支持版本</a>\类型</th> <th><span class="browser-ie">IE</span></th> <th><span class="browser-firefox">Firefox</span></th> <th><span class="browser-safari">Safari</span></th> <th><span class="browser-chrome">Chrome</span></th> <th><span class="browser-opera">Opera</span></th> </tr></thead><tbody><tr><th>版本</th> <td class="unsupport">6.0-7.0</td> <td rowspan="2" class="support">4.0</td> <td rowspan="2" class="support">5.1</td> <td rowspan="2" class="support">13.0</td> <td rowspan="2" class="support">11.50</td> </tr><tr><th>版本</th> <td class="support">8.0</td> </tr></tbody></table> ### 示例: - **string:** 你的浏览器是否支持content属性:否 - **attr:** - **url():** 如果你看到文字前面的图标则说明你目前使用的浏览器支持content属性 - **counter(name):** 1. 列表项 1. 列表项 1. 列表项 - **counter(name,list-style-type):** 1. 列表项 1. 列表项 1. 列表项 - **counter(name)拓展应用:** 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 1. 列表项 Copyright © 2006-2012 [Doyoe](http://www.doyoe.com/). All Rights Reserved