CSS3 毛玻璃效果

先上效果图:

屏幕快照 2020-01-02 下午5.28.13.png

1. html部分

  

2.css部分

 .login_images {
  width: 100%;
  height: 100vh;
  background: url("/static/images/login.jpg") no-repeat;
  background-size: cover;
  background-position: center center;
  display: flex;
  justify-content: center;
  align-items: center;
}
.testView {
  width: 500px;
  height: 800px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
}

关键在 backdrop-filter: blur(20px);这个地方。

你可能感兴趣的:(CSS3 毛玻璃效果)