Why is “border-color” overridden by “color”?

前端 未结 6 752
野趣味
野趣味 2021-01-22 09:06

I have the following css:

.isActiveFilter {
  color: black;
  background-color: rgba(0, 184, 170, .5);
  padding: 15px 10px 10px 10px;
  border-color: red;
  bor         


        
6条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-22 09:38

    #works {
      border: 3px solid;
      border-color: red;
      }
    
    #broken {
      border-color: red;
      border: 3px solid;
      }

    Some Text

    doesn't work

    Place the color after the border

    border: 3px solid;
    border-color: red;
    

    While the other answers are better, this worked on my end.

提交回复
热议问题