搞不懂下面这个css样式加上:after之后就不起作用了
来源:互联网 发布:linux 系统 死机 日志 编辑:程序博客网 时间:2024/09/21 08:57
<!DOCTYPE html>
<html>
<head>
<style>
body p:first-child>a:after
{
background-color:yellow;
}
</style>
</head>
<body>
<p>这个段落是其父元素(body)的首个子元素。
<a>this is </a>
这里还有类
</p>
<h1>欢迎访问我的主页</h1>
<p>这个段落不是其父元素的首个子元素。</p>
<div>
<p>这个段落是其父元素(div)的首个子元素。
<div>
<a>this is </a>
</div>
这里还有类容
</p>
<p>这个段落不是其父元素的首个子元素。</p>
</div>
<p><b>注释:</b>对于 IE8 及更早版本的浏览器中的 :first-child,必须声明 <!DOCTYPE>。</p>
</body>
</html>
<html>
<head>
<style>
body p:first-child>a:after
{
background-color:yellow;
}
</style>
</head>
<body>
<p>这个段落是其父元素(body)的首个子元素。
<a>this is </a>
这里还有类
</p>
<h1>欢迎访问我的主页</h1>
<p>这个段落不是其父元素的首个子元素。</p>
<div>
<p>这个段落是其父元素(div)的首个子元素。
<div>
<a>this is </a>
</div>
这里还有类容
</p>
<p>这个段落不是其父元素的首个子元素。</p>
</div>
<p><b>注释:</b>对于 IE8 及更早版本的浏览器中的 :first-child,必须声明 <!DOCTYPE>。</p>
</body>
</html>
1 0
- 搞不懂下面这个css样式加上:after之后就不起作用了
- 真的搞不懂了
- 样式不起作用 css无效
- 搞不懂啊,为什么会这样,连结果都输不出来,怎么就AC了呢?
- poj1258 prime算法+距离表 还是47MS,搞不懂,过了就好。
- 搞大数据,你不懂这三大数据处理趋势就OUT了
- 不懂 Message,MessageQueue,Looper,Handler的看这个就明白了
- wince 四年之后,我这个菜鸟终于开始搞android了。
- 搞不懂了啊,怎么回事呢
- 搞不懂.....
- 搞不懂
- 搞不懂
- 搞不懂
- 搞不懂
- 刚写的一篇点了另存为草稿之后就丢失了,决定这个博客就到此为止
- java学习之路----对spring的初步研究-----你看了这个都不懂什么叫IOC,我就。。。。
- 不懂就学,错了就改
- span 设CSS样式总是不起作用
- shellcode学习总结
- PAT1003Emergency (25)
- android本地音乐播放(二)
- linux内核开机logo显示几分钟之后黑屏解决办法
- 【caffe-Windows】caffe+VS2013+Windows无GPU快速配置教程
- 搞不懂下面这个css样式加上:after之后就不起作用了
- Html+CSS_居中布局的总结
- 代码训练营——泛型实例
- 面向AMD64的文件xxx与项目的目标平台x86不兼容
- 删除链表中重复的结点
- Mysql 5.5多实例部署步骤
- 表格布局—计算器
- 第十、十一周项目1:阅读程序,写出执行结果(1)
- android登陆模块 联网登陆和离线登陆 类似微信离线登陆