css背景滤镜效果

代码语言:html

所属分类:背景

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
}

body {
  background-color: black;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.container {
  background-image: url("http://repo.bfw.wiki/bfwrepo/image/5e41f260a3619.png");
  background-size: cover;
  height: 100vh;
  padding: 10px;
  width: 100%;
  position: relative;
}
.container iframe {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.boxes {
  display: -webkit-box;
  display: flex;
  margin-right: 10px;
  overflow: scroll;
  min-height: 90vh;
  width: 100%;
  -webkit-box-align: center;
          align-items: center;
}
.boxes p {
  display: block;
  font-weight: 600;
  min-width: 200px;
  color: white;
  font-size: 40px;
}
@media (min-width: 767px) {
  .boxes p {
    font-size: 60px;
    min-width: 300px;
  }
}

.box {
  border: 1px solid rgba(255, 255, 255, 0.7);
  min-width: 400px;
  min-height: 95vh;
  line-height: 1;
  padding: 15px 15px;
  -webkit-transition: all .3s ease;
  transition: all .3s ease;
}
.box:nth-child(1n + 1) {
  border-right: none;
}
.box h1 {
  font-weight: 400;
  font-size: 18px;
}

.none {
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}

.grayscale {
  -webkit-backdrop-filter: grayscale(1);
          backdrop-filter: grayscale(1);
}

.brightness {
  -webkit-backdrop-filter: brightness(1.5);
          backdrop-filter: brightness(1.5);
}

.blur {
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
}

.cont.........完整代码请登录后点击上方下载按钮下载查看

网友评论0