标签:style c class blog code java
/* IE6下最小宽度的CSS表达式 */
width:100%; min-width:1024px; _width:expression((document.documentElement.clientWidth||document.body.clientWidth)<1024?"1024px":"");
模块垂直居中,兼容IE6,注意,模块的所有父辈标签不能有定位属性,不能有overflow:hidden;
.duilian_right{width:90px; height:300px; position:fixed; top:50%; left:50%; margin-top: -150px;} .duilian_right{_position:absolute;_margin-top: auto; _top:expression(eval(document.documentElement.scrollTop + (document.documentElement.clientHeight-this.offsetHeight)/2));}
或者:
.surveypop { border:5px solid #721e1f; height:520px; width:400px; margin-top:5px; background-color:#fff; position:fixed; left:-9999em; top:-9999em; margin-left:-210px; display:none; font:14px "Microsoft YaHei","黑体"; color:#734925; z-index:990; background:#cecece; } * html .surveypop { position:absolute; top:50%; margin-top:expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + ‘px‘); }
常用css表达式-最小宽度-上下居中,布布扣,bubuko.com
标签:style c class blog code java
原文地址:http://www.cnblogs.com/zhidong123/p/3754784.html