📜  下面的文本使用伪过滤 css - CSS 代码示例

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

代码示例1
.blur {
  height: 222px;
  position:relative;
  font-size:40px;
  text-align:center;
}

.blur:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  filter: blur(5px);
  z-index:0;
}
.blur span {
  position:relative;
  z-index:1;
}