Home >Web Front-end >HTML Tutorial >兼容IE6的最大宽度max-width效果_html/css_WEB-ITnose

兼容IE6的最大宽度max-width效果_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:30:101259browse

兼容IE6的最大宽度max-width效果:
由于IE6浏览器并不支持度max-width属性,所以要在IE6下实现此效果,需要一些兼容性写法。
代码如下:

 

.max_width{  max-width:600px;  _width:expression(document.body.clientWidth > 600 ? "600px" : "auto");}

 

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=13030

更多内容可以参阅:http://www.softwhy.com/divcss/

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn