一、效果图。二、HTML+CSS。<style>*{padding:0;margin:0;font-size:12px;}li{list-style:none;}a{text-decoration:none;}.clear:after{content:‘‘;display:block;clear:both;}.clear{zoom:1;}.box{width:958px;border:1pxsolid#c6c6c6;height:328px;margin:90pxauto;}.l..
分类:
其他好文 时间:
2014-11-04 19:53:57
阅读次数:
257
外边距叠加This paragraph has a 20px margin.给div框设置10像素外边距,段落设置20像素外边距,效果会是下图。段落的外边距与div的外边距叠加,形成20像素的垂直外边距。这些外边距不是被div包围,而是突出到div的顶部和底部的外边。如果元素没有垂直边框或内边距,它...
分类:
其他好文 时间:
2014-11-04 19:31:45
阅读次数:
254
1、IE6双边距问题? 在IE6的浏览器中明明设置的是10px的margin却为什么显示的是20px的margin其实这个Ie6的一个双边距BUG例如:因为加上浮动后就会多出一倍的边距,浮动后本来外边距10px,但IE6会解析成20px,只需要在div的样式里加上display:inline;就可以...
分类:
Web程序 时间:
2014-11-04 14:25:34
阅读次数:
224
代码拍上,赶时间的童鞋拿着用就好:div {width: 1000px; height: 500px;position: absolute; left: 0; top: 0; right: 0; bottom: 0;margin: auto; /* 重点在于 auto */}博主之前用的方式也是不错...
分类:
其他好文 时间:
2014-11-04 13:06:26
阅读次数:
108
cmstop-error.csshtml,body,head,div,p,a { margin: 0; padding: 0;}.body-bg { background-color: #dff1f4;}.main { width: 700px; overflow: h...
分类:
其他好文 时间:
2014-11-04 10:54:45
阅读次数:
295
js元素的offsetWidth与clientWidth很相似,因此放在一起记录。1、clientWidth与offsetWidthclientWidth=元素内容区域宽度+水平内边距padding. offsetWidth=元素的内容区域宽度+水平内边距padding+边框的宽度。因此,可以认为....
分类:
Web程序 时间:
2014-11-03 20:39:17
阅读次数:
236
第一次写博客,不太专业,废话不多说,直接上自己早上做的东东。有不足之处,希望指点。css:body{counter-reset: p;}p{width: 100px;margin: 20px 0;font: normal 40px/1.5 Arial;text-align: center;borde...
分类:
Web程序 时间:
2014-11-03 16:16:54
阅读次数:
185
absolute:绝对定位,CSS写法“position:absolute;”,它的定位分两种情况,如下: 1.没有设定Top、Right、Bottom、Left的情况,默认依据父级的“内容区域原始点”为原始点,上面例子红色部分(父级黄色区域有Padding属性,“坐标原始点”和“内容区域原始点”....
分类:
Web程序 时间:
2014-11-03 15:51:07
阅读次数:
178
设置文件字符编码:
内部样式表:
hr {color: sienna;}
p {margin-left: 20px;}
body {background-image: url("images/back40.gif");}
外联样式表:
html内部编写js:
外联js:...
分类:
Web程序 时间:
2014-11-02 19:40:53
阅读次数:
153