How to make double lines border in CSS, each line in different color, without using background image?

前端 未结 11 969
广开言路
广开言路 2020-12-24 12:38

How to make a double line border in CSS, each line in a different color without using background-image?

For example like this:

11条回答
  •  余生分开走
    2020-12-24 13:14

    I don't think there is a way to do this without an additional element.

    There's outline, but it doesn't allow a outline-bottom rule: An outline can only be identical on all four sides.

    The :after pseudo-class will allow the adding of text content only, no elements.

    Here's how to do it with an additional hr.

提交回复
热议问题