标签:parent splay href 高度 size ack sla ie 6 clear
2016.1.4
1.清除浮动方法
使用伪类添加一个空元素
.clearfix:after {
content: "\0020";
display: block;
height: 0;
clear: both;
}
.clearfix {
zoom: 1;
}
"clearfix"是父容器的class名称,"content:"020";"是在父容器的结尾处放一个空白字符,"height: 0;"是让这个 这个空白字符不显示出来,"display: block; clear: both;"是确保这个空白字符是非浮动的独立区块。
但是,:after选择符IE 6不支持,也就是说上面的这段代码在IE 6中无效,这怎么办?
我们添加一条IE 6的独有命令"zoom:1;"就行了,这条命令的作用是激活父元素的"hasLayout"属性,让父元素拥有自己的布局。IE 6会读取这条命令,其他浏览器则会直接忽略它。
2.去除a标签默认下划线
a{
text-decoration:none;
}
3.div画斜线
.u-dater{
position:relative;
background-color: transparent;
}
.u-dater:before{
content:"";
position:absolute;
left:.45rem;
top:1.2rem;
border-left:1.2rem solid transparent;
border-bottom:.8rem solid #d9d6a4;
}
.u-dater:after{
content:"";
position:absolute;
left:.5rem;
top:1.25rem;
border-left:1.2rem solid transparent;
border-bottom:.8rem solid white;
}
2016.1.5、1.6
1.div内容右对齐
text-align: right;
2.-webkit-tap-highlight-color: transparent;
3.移动设备响应式设计
当页面只需要占据一页时,高度用vh表示
12.16~12.23工作日志
标签:parent splay href 高度 size ack sla ie 6 clear
原文地址:http://www.cnblogs.com/leeshuang/p/6264484.html