📜  如何为图像添加颜色 css 代码示例

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

代码示例1
.box-2:before {
      content: "";
      display: block;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(125, 2, 150, 0.5);
      transition: background .3s linear;
}

    .box-2 {
      position: relative;
      float: left;
      cursor: pointer;
}