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 type="text/css">
    <!--设置DIV块的边界为5px-->
    div{margin:5px;border:0;padding:0;}
    #Box1{
        width:200px;
        height:72px;
        background-color:#666;
    }
    #Box2{
        width:200px;
        height:72px;
        background-color:#F0F;
    }
    </style>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>让上下两个DIV块之间有一定距离或没有距离</title>
    </head>
    
    <body>
    <div id="Box1"></div>
    <div id="Box2"></div>
    </body>
    
    </html>
    Smartkeke
  • 相关阅读:
    Linux
    Other
    Linux
    VIM
    Linux
    其他
    Win10
    Win10
    IDE
    其他
  • 原文地址:https://www.cnblogs.com/smartkeke/p/6896409.html
Copyright © 2011-2022 走看看