代码之家  ›  专栏  ›  技术社区  ›  Srikar Appalaraju Tonetel

如何更改标签的厚度

  •  266
  • Srikar Appalaraju Tonetel  · 技术社区  · 15 年前

    我想在CSS中更改水平规则的厚度。我知道可以用HTML这样做-

    <hr size="10">
    

    但我听说这是 deprecated 如上文所述 MDN here . 在我尝试使用的CSS中 height:1px 但它不会改变厚度。我想要 <hr> 0.5px 厚的。

    我在Ubuntu上使用火狐3.6.11

    7 回复  |  直到 7 年前
        1
  •  460
  •   Stephan Wagner    11 年前

    <hr> <

    hr {
        border: none;
        height: 1px;
        /* Set the hr color */
        color: #333; /* old IE */
        background-color: #333; /* Modern Browsers */
    }
    

    <hr style="height:1px;border:none;color:#333;background-color:#333;" />
    

    here

        2
  •  49
  •   Robert Koritnik    13 年前

    Sub-pixel rendering blog post

    #f0f ClearType

    aperture grille

    #fff HR #eee

    hr
    {
        background-color: #eee;
        border: 0 none;
        color: #eee;
        height: 1px;
    }
    

        3
  •  7
  •   Muscaria    10 年前


    <hr style="border-bottom: 0px">
    


    <hr style="border-top: 0px">
    


    <hr style="border: none; border-bottom: 1px solid red;">
    

        4
  •  4
  •   meddy    11 年前

        5
  •  4
  •   Yaerius    7 年前

    hr {
        height: 0px;
        border: none;
        border-top: 1px solid black;
    }
    
        6
  •  0
  •   Gaunt user3211238    8 年前

    <hr style="opacity: 0.25">
    
        7
  •  -4
  •   Ankheg    15 年前

    <style>
      .hr { height:0; border-top:1px solid _anycolor_; }
      .hr hr { display:none }
    </style>
    
    <div class="hr"><hr /></div>