css draws a 0.5px straight line

[css] Draw a 0.5px straight line_css draw a 0.5px straight line_a Strong Bubble’s Blog-CSDN Blog

Some graphics used for decoration, such as setting icons in front or behind the font, and drawing a line

If you want to draw a very thin line, 0.5px, how to draw it?

Using the scaleY(0.5) function of CSS3's transform, the object graphic is deformed and scaled. 0.5 means scaling to half of the original size.

.btn-box::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    transform: scaleY(1);
    background-color: #0b86a6;
    left: 10px;
    top: 42px;
    
}

Guess you like

Origin blog.csdn.net/Frank_colo/article/details/133378347