CSS调整DIV最小高度问题探讨
2013-04-15 14:39
591 查看
//JS代码部分: var isShowFlag = 1;//是否显示 function isShowDet(){ if(isShowFlag == 0){ document.getElementById("queryDeatilDIV").style.display=''; isShowFlag = 1; }else{ document.getElementById("queryDeatilDIV").style.display='none'; isShowFlag = 0; } } // body部分: <div id="showDiv" align="center" style="font-size:1px;"> <input id="showFlag" type="button" style="width:100px;height:7px;" onclick="isShowDet();"> </div> <div id="queryDeatilDIV"> <iframe name="iframe1" width="100%" height="190" frameborder="0" scrolling="auto"></iframe> </div> 假如div里有内容,即有元素,那么div默认有一个最小高度,这个是浏览器默认文字(应该是)高度,如果div没有设置属性font-size:10px; 那么该div最小的高度则是浏览器默认文本高度,反之,则是以font-size为准。
相关文章推荐
- CSS调整DIV最小高度问题
- CSS调整DIV最小高度问题
- CSS Div 最小高度在IE 6 和IE 7中的兼容性问题
- [转]怎样调整CSS设置DIV图层自适应高度且最小高度
- CSS+DIV问题!DIV的最小高度问题!
- CSS Div 最小高度在IE 6 和IE 7中的兼容性问题
- Div+CSS 制作三栏式页面布局(左右高度随中间内容自动调整)
- DIV+CSS左右列高度自适应问题
- CSS: 解决Div float后,父Div无法高度自适应的问题
- CSS控制div宽度最大宽度/高度和最小宽度/高度
- 关于div行高的巨细问题(如何设置 div 的最小高度)
- CSS布局中的最小高度问题
- DIV+CSS兼容解决DIV最大宽度和最小宽度问题
- 研究了一下div+css的高度自适应问题
- CSS网页布局中的最小高度问题的解决方法
- DIV+CSS处理DIV设置float后,父容器无法定位高度的问题解决
- 【浏览器兼容性】css解决IE、Firefox兼容的div高度100%的问题
- 不固定宽度和高度的情况下CSS调整div居中的方法总结
- css中div不能被撑开高度不能自适应的问题
- CSS: 解决Div float后,父Div无法高度自适应的问题