好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

【】H5DIV高度变0的问题_html/css_WEB-ITnose

HTML代码如下。
如果去掉第一行的 ,则下面标红的DIV就能够显示出来。如果加上第一行的 ,标红的DIV的高度就变成0px了。我原本是想通过百分比设置高度的。但是却出现了这个问题。。。
哪位大侠帮忙看一下。谢谢!















body { font: 12px/1.5 tahoma, "microsoft yahei", "微软雅黑E\8F6F\96C5\9ED1"; }
body, div, ul, li, h1 { margin: 0; padding: 0; }
.style-main {margin:0; padding: 0; width: 100%; height: 100%; background-color: #fcfcfd; overflow: hidden; position: relative; font-size: 2vh;}
.style-container {margin:0; padding: 0; width: 100%; height: 50%; background-color: #fcfcfd; overflow: hidden; position: relative; font-size: 2vh;}
.style-line1 {margin:0; padding: 0; width: 100%; height: 20%; background-color: #fcfcfd; overflow: hidden; position: relative;}
.style-line2 {margin:0; padding: 0; width: 100%; height: 10%; background-color: #fcfcfd; overflow: hidden; position: relative;}
.style-line3 {margin:0; padding: 0; width: 100%; height: 50%; background-color: #fcfcfd; overflow: hidden; position: relative;}
.style-line4 {margin:0; padding: 0; width: 100%; height: 20%; background-color: #fcfcfd; overflow: hidden; position: relative;}
.news { margin: 0; }
.news ul { list-style: none; }
.news-arean { margin:0; padding: 0; width: 100%; height: 100%; background-color: #fcfcfd; overflow: hidden; position: relative; }
.news-box { margin:0; padding: 0; width: 100%; height: 20%; background-color: #fcfcfd; overflow: hidden; position: relative; font-size: 2vh;}
.news-interval { margin:0; padding: 0; width: 100%; height: 5%; background-color: #fcfcfd; overflow: hidden; position: relative; }
.news h1 { margin-bottom: 15px; padding-left: 20px; color: #370188; }
.news-list { position: absolute; }
.news-list li { width: 100%; height: 100%; line-height: 100%; overflow: hidden; word-wrap: normal; font-size: 1em;}
.news-list li a { text-decoration: none; color: #000; }
.news-list li a:hover {
-webkit-transition: color .2s linear, background-color .3s linear;
-moz-transition: color .2s linear, background-color .3s linear;
-ms-transition: color .2s linear, background-color .3s linear;
-o-transition: color .2s linear, background-color .3s linear;
transition: color .2s linear, background-color .3s linear;
color: #FF4400;
text-decoration: underline;
}
.news-list li a:visited { color: #290065; }









查看更多关于【】H5DIV高度变0的问题_html/css_WEB-ITnose的详细内容...

  阅读:41次