为了增强记忆自己把博客当做一个记事本胡乱记录些自己的相关技术资料,哈尔滨网站设计学习
伪类选择器,伪类的权重为10。
e:frist-child{} 第一个元素的样式设置
e:last-child{} 最后的样式
e:nth-child(n){}某个样式 N代表数字
e:nth-child(even) 偶数样式 (ood)奇数样式
还可以以公式形式e:nth-child(2n) 20+1 5n n+5 -n+5 等算法
n+5 5以后样式开始
e:of-type{} e 全部选择类型 e:forst-of-type{} 第一个 选择器 e:last-of-type{} 最后一个选择器 e:of-type(n) 某个元素属性
div::before {content:“我”;} 是在内容前面插入一个内容
div::after{content:”猪”;} 是在后面插入一个内容
p::after {
content: ‘’;
position: absolute;
top: 10px;
right: 10px;
font-family: ‘icomoon’;
} */
p::after {
content: '\ea50';
position: absolute;
top: 10px;
right: 10px;
font-family: 'icomoon';
评论前必须登录!
注册