小白教程
所有教程
关于
Search
172.70.131.173
172.70.131.173
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Sel firstline”的源代码
本页内容
上一节:
Sel_firstletter
下一节:
Sel_firstchild
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE::first-line}}[[Category:css selectors|19]] = CSS :first-line 选择器 = [[css selectors|完整CSS选择器参考手册]] 每个<p>元素的第一行选择的样式: <sample title="" desc="" lang="html" hererun="1"> p:first-line { background-color:yellow; } </sample> <run name=""> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>小白教程(xiaobai.wang)</title> <style> p:first-line { background-color:yellow; } </style> </head> <body> <h1>WWF's Mission Statement</h1> <p>To stop the degradation of the planet's natural environment and to build a future in which humans live in harmony with nature, by; conserving the world's biological diversity, ensuring that the use of renewable natural resources is sustainable, and promoting the reduction of pollution and wasteful consumption.</p> </body> </html> </run> == 定义和用法 == :first-line选择器用来指定选择器第一行的样式。 '''注意:''':first-line选择器可以使用以下属性: * font properties * color properties * background properties * word-spacing * letter-spacing * text-decoration * vertical-align * text-transform * line-height * clear '''注意:''' "first-line" 选择器适用于块级元素中。 == 浏览器支持 == 表格中的数字表示支持该属性的第一个浏览器版本号。 {| class="table table-striped table-hover" ! 选择器 ! Chrome ! Internet Explorer / Edge ! Firefox ! Safari ! Opera |- | ::first-line | 1.0 | 9.0部分从5.5 | 1.0 | 1.0 | 7.0部分从3.5 |} == 相关文章 == CSS 教程: [[css pseudo elements|CSS 伪类]] [[css selectors|完整CSS选择器参考手册]]
返回至“
Sel firstline
”。
上一节:
Sel_firstletter
下一节:
Sel_firstchild