摘要: 关于css部份技巧, div在IE6/IE7/IE8/FF 不同浏览器 中的效果兼容 收藏 1.div的垂直居中问题 vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然后插入文字,就垂直居中了。缺点是要控制内容不要换行2. margin加倍的问题 设置为float的div在ie下设置的margin会加倍。这是一个ie6都存在的bug。解决方案是在这个div里面加上display:inline;3.浮动ie产生的双倍距离 #box{ float:left; width:100px; margin:0 0 0100px; //这种 阅读全文
posted @ 2011-05-29 11:28 红色曼陀罗 阅读(214) 评论(0) 推荐(0) 编辑
摘要: #menu_con li a{ display:block; float:left; 如何为一个元素设置左右两个背景图片 background:url(images/menu_on_left2.gif) no-repeat left top; cursor:pointer; padding-left:3px;}#menu_con li aspan{ float:left; padding:6px10px 4px 10px; line-height:12px; background:url(images/menu_on_right2.gif) no-repeat righttop;}#menu_ 阅读全文
posted @ 2011-05-29 11:25 红色曼陀罗 阅读(197) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css">#footerzizi{width:800px;}#footerzizi ul li{clip: rect(auto,5px,auto,5px);white-space: nowrap;list-style-type: none;font-size: 13px;margin-top: 6px;float: left;width: 70px;text-align: center;border-right-width: thin;border-right-style: solid;border-right-color: 阅读全文
posted @ 2011-05-29 11:17 红色曼陀罗 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 具体代码:<style type="text/css">body { font:normal 12px/1.5em "宋体", Verdana,Lucida, Arial, Helvetica, sans-serif;} /* 设置页面中所有文字的样式 */ul { width:150px; margin:0; padding:0; list-style:none; border-bottom:1px solid #CCCCCC;} /* 将无序列表ul的宽度设置为150px,并且去除内补丁和外补丁以及默认的列表修饰符,最后再添加边框 */# 阅读全文
posted @ 2011-05-29 11:17 红色曼陀罗 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-05-29 11:09 红色曼陀罗 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-05-29 11:06 红色曼陀罗 阅读(71) 评论(0) 推荐(0) 编辑
摘要: p{text-indent: 2em} 阅读全文
posted @ 2011-05-29 11:00 红色曼陀罗 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-05-29 10:54 红色曼陀罗 阅读(62) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css">#a{width:128px;height:128px;background:url(1.png) no-repeat 0 0;background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='1.png',sizingMethod='crop');}img{_display:none;}</style></head><body><div id=&qu 阅读全文
posted @ 2011-05-29 10:52 红色曼陀罗 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 其实这应该算是IE6的一个BUG吧!absolute层没有占位,因此我们可以在absolute层的外面加一个div,如下:<div style="position:relative;"> <div> <div style="position:absolute;">absolute层</div> </div> <div>左边的层!</div> <div>右边的层!</div></div> 像上面这样,加上一个div之后,就可以正确的显示出 阅读全文
posted @ 2011-05-29 10:51 红色曼陀罗 阅读(129) 评论(0) 推荐(0) 编辑
摘要: ie6如何显示透明图片 阅读全文
posted @ 2011-05-29 10:41 红色曼陀罗 阅读(279) 评论(0) 推荐(0) 编辑