01 2016 档案
position:fixed;如何居中
摘要:div{ position:fixed; margin:auto; left:0; right:0; top:0; bottom:0; width:100px; height:100px;}如果只需要左右居中,那么把 bottom:0; top:0; ... 阅读全文
posted @ 2016-01-18 14:46 hrbust_09zhangyabin 阅读(657) 评论(0) 推荐(0)
子元素应该margin-top影响父元素的解决办法
摘要:在子元素设置margin-top,有时会带着父元素一起移动。原因: Outer Div [margin: 0 auto] Inner Div [margin-top: 10px] 根据CSS2.1盒模型规范,两层Div结构,Outer Div属性为“margin:0 auto”,本该紧贴外框顶... 阅读全文
posted @ 2016-01-15 10:12 hrbust_09zhangyabin 阅读(322) 评论(0) 推荐(0)
CSS定位机制总结
摘要:1,CSS 有三种基本的定位机制:普通流、浮动和绝对定位。除非专门指定,否则所有框都在普通流中定位。2,普通流定位:块级框从上到下一个接一个地排列,框之间的垂直距离是由框的垂直外边距计算出来。行内框在一行中水平布置。可以使用水平内边距、边框和外边距调整它们的间 距。3,CSS position... 阅读全文
posted @ 2016-01-07 22:58 hrbust_09zhangyabin 阅读(143) 评论(0) 推荐(0)
使用CSS设置行间距,字间距
摘要:原链接:http://blog.sina.com.cn/s/blog_a03d702f01013u3q.html字间距1、text-indent设置抬头距离css缩进即对,对应div设置css样式text-indent : 20px; 缩进了20px2、letter-spacing来设置字与字间距_... 阅读全文
posted @ 2016-01-04 11:14 hrbust_09zhangyabin 阅读(10755) 评论(0) 推荐(0)