zoukankan      html  css  js  c++  java
  • 垂直居中

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>垂直居中</title>
        <style>
            .container{
                 300px;
                height:300px;
                background:#ccc;
                float:left;
                text-align:center;
                display:table;
            }
            .box{
                display:table-cell;
                vertical-align:middle;
            }
            .img-box{
                300px;
                height:300px;
                background:#F88;
                text-align:center;
                float:left;
                display:table;
    
            }
            .img-box span{
                display:table-cell;
                vertical-align:middle;
            }
        </style>
    </head>
    <body>
    <div class="container">
        <div class="box">
            <p>看我是否可以居中。</p>
            <p>看我是否可以居中。</p>
            <p>看我是否可以居中。</p>
            <p>看我是否可以居中。</p>
            <p>看我是否可以居中。</p>
        </div>
    </div>
    <!--下面是代码任务区-->
    <div class = "img-box">
        <span>
            <img src="http://img.mukewang.com/54ffac56000169c001840181.jpg" title="害羞的小女生"/>
        </span>
    </div>
    </body>
    </html>
    

      

  • 相关阅读:
    ubuntu装openssh-client和openssh-server
    路由器开源系统openwrt配置页面定制
    linux 串口接收
    SHA算法
    密码学Hash函数
    椭圆曲线加密
    ElGamal密码
    Diffie-Hellman密钥交换
    RSA加密
    公钥密码学
  • 原文地址:https://www.cnblogs.com/shenq/p/4924685.html
Copyright © 2011-2022 走看看