当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS content属性

CSS
CSS2 Aural
CSS 单位
CSS 颜色
CSS 颜色值
CSS 颜色名称
CSS 编码与组织技巧
CSS 模块化设计思路
CSS完美兼容IE6/IE7/FF的通用方法
CSS @ Ten: 下一个重要的东西

CSS content属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 363 ::
收藏到网摘: n/a

The content property is used with the :before and :after pseudo-elements to generate content to attach before or after a CSS selector.
content属性可通过:before 和 :after 这两个伪元素来给CSS选择器的前后生成附带内容。

Inherited: No
继承性:无

举例

p:before
{
content: url("beep.wav")
}

img:before
{
content: attr(alt)
}

可用值

描述
NN IE
string Defines text content
定义文字内容
   
url Defines a url
定义url资源
   
counter(name)
counter(name, list-style-type)
counters(name, string)
counters(name, string, list-style-type)
     
attr(X) Defines an attribute of a selector to be displayed before/after the selector
定义选择器前后的属性
   
open-quote      
close-quote      
no-open-quote      
no-close-quote      

评论 (0) All

登陆 | 还没注册?