当前位置: 代码迷 >> HTML/CSS >> 简单的样式有关问题
  详细解决方案

简单的样式有关问题

热度:382   发布时间:2012-02-09 18:22:27.0
简单的样式问题
<body style="height:100%;margin:0px;padding:0px;">
  <form id="form1" runat="server">
  <div style="height:100%">
  <div style="height:100%;background-color:Black;"></div>
  <div style="height:30px;background-color:Maroon;"></div>
  </div>
  </form>
</body>

我要实现一个div高度为100%,另一个高度为30px,不出现滚动条 怎么定义样式

------解决方案--------------------
不需要滚动样的DIV中写入 overflow:hidden;height:***px;
------解决方案--------------------
<style type="text/css">
*{height:100%}
</style>
加上这个式样就可以了
------解决方案--------------------
不需要滚动样的DIV中写入 overflow:hidden;
  相关解决方案