CSS入门教程:定义字符串
时间:2011-03-06 07:38来源: 作者: 点击:
次
CSS入门教程,本文让我们来学习一下定义字符串。看下面的教程吧:
content -- 定义字符串
取值: normal | none | [ | | | attr() | open-quote | close-quote | no-open-quote | no-close-quote ]+
CSS入门教程,本文让我们来学习一下定义字符串。看下面的教程吧:
- content -- 定义字符串
- 取值: normal | none | [ <string> | <uri> | <counter> | attr(<identifier>) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
- 引用网址:http://www.dreamdu.com/css/property_content/
- 初始值: normal
- 继承性: 否
- 适用于: :before与:after
- content,中文的"内容"意思
示例:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>CSS入门教程: 定义字符串</title> <style type="text/css" media="all"> h1:before { content: "建站学: "; display: inline; } div:before, div:after { background: lightgreen; content: "建站学"; } </style> </head> <body> <h1></h1> <div>在div的前后都增加了内容</div>
</body> </html>
(责任编辑:admin) |
织梦二维码生成器
------分隔线----------------------------