CSS怎样设置DIV高度为浏览器窗口100%高度

By admin, 13 二月, 2015

div { height:100vh; }

说明:vh是viewport height,单位是%,如果前面不是100而是1,就表示窗口高度的1%。据说所有浏览器都支持。

标签

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"