search

Home  >  Q&A  >  body text

css - 边框凹陷效果怎么实现

如图这种凹陷效果的分割线,用css3怎么实现

PHP中文网PHP中文网2778 days ago1032

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 11:34:59

    box-shadow:0 1px 0 rgba(0,0,0,.2) inset,0 -1x 0 rgba(255,255,255,.2) inset;
    Exchanging 1px and -1px can raise; highlight The dark edge is translucent; there is no need to consider the color;

    reply
    0
  • PHPz

    PHPz2017-04-17 11:34:59

    Hmm, thanks @golden_freeman_china for the tip.

    box-shadow: inset 0 -1px 0 rgba( 255, 255, 250, 0.6), 
                inset 0 -2px 0 rgba( 0, 0, 0, 0.1);

    reply
    0
  • 黄舟

    黄舟2017-04-17 11:34:59

    :before,:after{
    border:1px solid yellow;

    }

    This can be achieved by combining pseudo elements with two borders. The color of the two borders is the key

    reply
    0
  • Cancelreply