zoukankan      html  css  js  c++  java
  • 浮动div高度为百分比解决方案

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head>
    <style>

    body{ font-size:12px; background-color:#ccc;height:100%;}
    .a{ 960px; margin:0px auto; padding-left:10px; padding-right:10px; background:#FFF; height:100%;zoom: 1; overflow:auto;}
    .b{ 300px; float:left; height:50%;}
    .c{ 650px; float:right; height:400px;}
    </style>
    <body>
    <div class="a">
    <div class="b">无标题文档无标题文档无标题文档无标题文档无标题文档无标题文档无标题文档</div>
    <div class="c">有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档有标签文档</div>
    </div>
    </body>
    </html>


    <style>
    * {
    margin: 0;
    padding: 0;
    }
    html{100%;height:100%;}
    body{height:100%;zoom: 1; overflow:auto;}
    </style>

  • 相关阅读:
    Postman几种常用方式
    PL/SQL 循环结构
    【oracle】解锁oracle用户,unlock
    四则运算题2
    有关Botton的用法(一)
    SQLiteOpenHelper的使用
    用Toast来增加调试效率的小技巧
    汇编语言-比较字符串
    正向代理和反向代理
    redis安装与配置
  • 原文地址:https://www.cnblogs.com/hyp5490-/p/6376825.html
Copyright © 2011-2022 走看看