IE6中的最小和最大宽度

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IE6中的最小和最大宽度相关的知识,希望对你有一定的参考价值。

  1. <!--[if lte IE 6]>
  2. <script type="text/javascript">
  3. window.attachEvent('onload', mmwidth);
  4. window.attachEvent('onresize', mmwidth);
  5. function mmwidth(){
  6. document.getElementById('somediv').style.width = ((document.documentElement.clientWidth ||
  7. document.body.clientWidth) < 1000) ? '1000px' :
  8. ((document.body.clientWidth > 1000) ? 'auto' : 'auto');
  9. };
  10. </script>
  11. <![endif]-->

以上是关于IE6中的最小和最大宽度的主要内容,如果未能解决你的问题,请参考以下文章