📜  如何在css代码示例中编写if条件

📅  最后修改于: 2022-03-11 14:47:26.255000             🧑  作者: Mango

代码示例1
$type: monster;
p {
  @if $type == ocean {
    color: blue;
  } @else if $type == matador {
    color: red;
  } @else if $type == monster {
    color: green;
  } @else {
    color: black;
  }
}