动态class的几种写法

1.

button {
  display: block;
  width: 165px;
  height: 46px;
  font-size: $font-big;
  /*background: linear-gradient(#1f3052, #1e283b);*/
  background: #4A8074;
  box-sizing: border-box;
  border: 2px solid transparent;
  cursor: pointer;
  color: $font-color-normal;
  font-weight: bold;
  margin-bottom: 10px;
  outline: none;

  &.active {
    background: linear-gradient(#3a97a8, #0b5d74);
    border: 2px solid #2e4e5d;
  }
}
2.

play:true

.control {
  width: 64px;
  height: 64px;
  cursor: pointer;

  &.play {
    background-image: url("../../../static/images/mutiplyHistory/play.png");
  }
  &.pause {
    background-image: url("../../../static/images/mutiplyHistory/pause.png");
  }
}

3.

.picDiv{
  width: 64px;
  height:64px;
  float: left;
  img{
    width: 64px;
    height: 64px;
  }
  &.divSelected{
    width: 72px;
    height:72px;
    img{
      width: 72px;
      height: 72px;
    }
  }
}

4.

.nextImg{
  cursor: pointer;
  position: absolute;
  bottom: $turn-logo-bottom;
  right: $turn-logo-right;
  pointer-events: auto;
  &.yes{
    
  }
  &.no{
   
  }

}

你可能感兴趣的:(vue,class)