水平居中(2)方式一:text-align:center适用类型:行级元素方式二:margin:0 auto;适用类型:块级元素垂直居中(7)方式一:line-height适用:内联、块级场景:单行文本垂直居中html: Content here css:#child {line-height: 2...
分类:
其他好文 时间:
2014-09-25 20:08:47
阅读次数:
195
分页JS代码
.page{margin:2em;}
.page a{text-decoration:none;display:inline-block;line-height:14px;padding:2px 5px;color:#333;border:1px solid #ccc;margin:0 2px;}
.page a:hover,.page a.on{background:#999;c...
分类:
Web程序 时间:
2014-09-25 11:35:58
阅读次数:
217
div css文字字体行高行距 DIVCSS5带您深入理解css行间距设置,字体行距如何最简单地设置。在文章中,要实现调节设置每行文字字体间距(行距)是使用line-height属性。要使得每行的文字一定的间距距离所以可以通过line-height样式实现。接下来DIVCSS5通过DIV CSS实例...
分类:
Web程序 时间:
2014-09-23 12:21:04
阅读次数:
234
1. [代码][CSS]代码 1, FF下给 div 设置 padding 后会导致 width 和 height 增加, 但IE不会.(可用!important解决)2, 居中问题.1).垂直居中.将 line-height 设置为 当前 div 相同的高度, 再通过 vetical-align....
分类:
Web程序 时间:
2014-09-19 17:14:35
阅读次数:
390
.Coupon{ color:@Gray; h5{ color:@DimGray;} li{ position:relative;margin:0;font-size:12px; line-height:22px;cursor:pointer; &:hover .coupont_layer{disp...
分类:
Web程序 时间:
2014-09-18 18:05:34
阅读次数:
175
1//.clearfix:before,.clearfix:after{display:table;content:"",line-height:0;}.clearfix:after{clear:both;}2//overflow:hidden;zoom:1;3//添加div设置:clear:bot...
分类:
Web程序 时间:
2014-09-15 17:09:59
阅读次数:
254
1:单行文字垂直居中: 如果一个容器中只有一行文字的话,定义height(高度)和 line-height(行高)相等即可。 如:aa2:多行文本固定高度垂直居中:核心:display:table 和display:table-cell ;vertical-align:middle;兼容:ie7+....
分类:
Web程序 时间:
2014-09-12 21:55:34
阅读次数:
250
水平居中的方法:1、margin:auto;2、text-align:center;3、posotion:50% + margin-left:-width/2;4、占位;5、JS动态控制;6、css弹性盒模型。垂直居中的方法:1、line-height(单行);2、padding-top;3、ver...
分类:
Web程序 时间:
2014-09-11 20:53:52
阅读次数:
191
中秋节快乐啊。。。 .a-btn{ display:block; position:relative; width:300px; margin:30px auto; height:40px; line-height:40px; border:2px ridge #fff; color:#fff; t...
分类:
其他好文 时间:
2014-09-10 14:00:10
阅读次数:
176
Bootstrap将全局font-size设置为14px,line-height为1.428。这些属性直接赋给和所有段落元素。另外,(段落)还被设置了等于1/2行高的底部外边距(margin)(即10px)。标题文字分为(h1-h6)h1:36pxh2:30pxh3:24pxh4:18pxh5:14...
分类:
其他好文 时间:
2014-09-09 15:20:18
阅读次数:
131