IE6下position解决父元素被撑开的问题
解决 元素 position IE6 问题
2023-09-14 09:01:07 时间
在IE6下面当子元素的宽度/高度大于父元素时, 父元素的宽度/高度就被撑开.IE7以上是不会被撑开的
<style> .f{width:100px; height:100px; background:#808080} .s{width:50px; height:150px; background:#4cff00;} </style> <div class="f"> <div class="s"></div> </div>
为了使IE6和其他的浏览器行为一致,我们可以在子元素中添加postion来解决问题
<style> .f{width:100px; height:100px; background:#808080; _overflow:hidden;} .s{width:50px; height:150px; background:#4cff00;_position: relative;} </style> <div class="f"> <div class="s"></div> </div>
相关文章
- [SpringMVC] - 解决 RequestMappingHandlerAdapter 报红的错误
- PostgreSQL安装之后pgAdmin 4无法显示,提示MIME类型为text/plain,无法执行的解决方法
- SpringMVC中出现" 400 Bad Request "错误(用@ResponseBody处理ajax传过来的json数据转成bean)的解决方法
- safari: css:解决translate时移动的元素闪烁(safari 15.5)
- selenium 定位元素不稳定怎么解决?
- 成功解决Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问
- 成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the
- 已解决(最新版selenium框架元素定位报错)NameError: name ‘By‘ is not defined
- tensorflow官方解决Ubuntu cuda安装问题
- 教你如何解决JS/TS里特定String进行拆分然后遍历各个元素
- 【云速建站】点击页面元素不跳转问题解决方法
- java - List取差集时报错 Method threw 'java.lang.UnsupportedOperationException' exception. 解决
- Leetcode 453. 最小操作次数使数组元素相等(未解决,仅供参考)
- Leetcode 503. 下一个更大元素 II(可以,已解决)
- Leetcode 347. 前 K 个高频元素(牛,终于解决)
- 解决使用DevExpress开发错误:未将对象引用设置到对象的实例