zoukankan      html  css  js  c++  java
  • html盒子水平和垂直居中

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>菜鸟教程(runoob.com)</title>
    <style>
    #main {
         400px;
        height: 150px;
        border: 1px solid #c3c3c3;
        display: flex;
        justify-content: center;
    	align-items: center;
    }
    
    #main div {
         70px;
        height: 70px;
    }
    </style>
    </head>
    <body>
    
    <div id="main">
      <div style="background-color:coral;"></div>
    </div>
    
    <p><b>注意:</b> Internet Explorer 10 及更早版本浏览器不支持 justify-content 属性。</p>
    <p><b>注意:</b> Safari 6.1 及更新版本通过 -webkit-justify-content 属性支持该属性。</p>
    
    </body>
    </html>
    

      

    原文地址:http://www.runoob.com/try/try.php?filename=trycss3_justify-content

  • 相关阅读:
    ubuntu使用iso作为本地源
    ubuntu配置简单的DNS服务器
    core data
    Core Animation教程
    制作framework&静态库
    notes
    textkit
    coretext
    nsset
    iOS Development Sites
  • 原文地址:https://www.cnblogs.com/yiweiyihang/p/8794406.html
Copyright © 2011-2022 走看看