zoukankan      html  css  js  c++  java
  • html 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">
    <head runat="server">
    <title></title>
    <style type="text/css">
    #a1
    {
    100px;
    height: 100px;
    float: left;
    background-color: Yellow;
    }
    #a3
    {
    100px;
    height: 100px;
    float: right;
    background-color: Blue;
    }
    #a2
    {
    auto;
    margin:0 100px;
    height: 100px;

    background-color: Green;
    }
    #all
    {
    min-370px;
    }
    </style>
    </head>
    <body>
    <form id="form1" runat="server">
    <div id="all" style=" 100%">
    <div id="a3">
    a3
    </div>
    <div id="a1">
    a1
    </div>
    <div id="a2">
    a2546464564646465ty
    </div>
    </div>
    </form>
    </body>
    </html>

  • 相关阅读:
    文件进阶
    文件及文件操作
    字符编码
    集合
    数据类型之字典
    数据类型之列表,元组
    数据类型之数字,字符串
    for 循环语句
    while 循环语句
    深浅拷贝
  • 原文地址:https://www.cnblogs.com/zhwl/p/4334219.html
Copyright © 2011-2022 走看看