div+css实现分形玻璃透视模糊效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现分形玻璃透视模糊效果代码

代码标签: div css 分形 玻璃 透视 模糊

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

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
html {
  height: 100%;
}

body {
  height: 100%;
  padding:0;  
  margin:0;
  position: relative;
}

.draggable {
  position: absolute;
  width: 200px;
  height: 200px;
  cursor: grab;
}

.blue-rectangle {
  background: linear-gradient(190deg, #0090FF 10%, #0D74CE 90%);
  transform: rotate(30deg);
  left: 100px;
  top: 40%; 
}

.yellow-circle {
  border-radius: 9999px;
  background: linear-gradient(190deg, #FFE629 10%, #9E6C00 90%);
  left: 300px;
  top: 40%; 

}

.glass-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 50%;
  width: 100%;
  display: flex;
  flex-direction: row;
  pointer-events: none;
}

.glass {
  width: 48px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 10%,
    rgba(4, 9, 20, 0) 70%,
    rgba(255, 255, 255, 0.1) 110%
  );
  backdrop-filter: blur(40px);
}
</style>


  
</head>

<body >
  <div class="draggable blue-rectangle" id="rectangle1"></div>
  <div class="draggable yellow-circle" id="rectangle2"></div>
  <div class="glass-overlay">
    <div class="glass"></div>
        <div class="glass"></div>
        <div class="glass"></div>
        <div class="glass"></div>
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0