CSS adjustment DIV minimum height problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:27:20
Original
1062 people have browsed it

//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为准。
Copy after login
Copy after login
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template