zoukankan      html  css  js  c++  java
  • font-size:100%和font-size:0

    h1,h2,h3,h4,h5,h6 {font-size:100%;}

    正常情况下hx按照一定百分比增加字号,但是指定font-size:100%;就会继承body设置的字体大小

    font-size:0的应用

    上面图片跟边框内还有一些间隙,可以设置font-size:0; 或line-height:0;去除

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
    </head>
    <body>
        <div style="182px;height:182px;">
            <a href="#" style="display: block;border: 1px solid #000; font-size: 0;">
            <img src="https://img.alicdn.com/bao/uploaded/i3/TB1b7vcLVXXXXbIXVXXXXXXXXXX_!!0-item_pic.jpg_180x180.jpg" alt="">
            </a>
        </div>
    </body>
    </html>

     

  • 相关阅读:
    redis
    JSP
    Cookie&Session
    Servlet
    HTTP
    TomCat
    CSS
    XML
    JDBC
    Mysql(对表的操作)
  • 原文地址:https://www.cnblogs.com/tinyphp/p/3800706.html
Copyright © 2011-2022 走看看