div+css布局棱镜玻璃折射阳光七彩虹效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局棱镜玻璃折射阳光七彩虹效果代码

代码标签: div +css 布局 棱镜 玻璃 折射 阳光 七彩虹 光线

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

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

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


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

.t {
  text-align: center;
  font-size: 4rem;
  background: linear-gradient(90deg, red 0%, #ff9a00 10%, #d0de21 20%, #4fdc4a 30%, #3fdad8 40%, #2fc9e2 50%, #1c7fee 60%, #5f15f2 70%, #ba0cf8 80%, #fb07d9 90%, red 100%);
  color: #0000;
  text-shadow: 0px 2px 0 #fff9, 0 0 0.4em #fff9;
  -webkit-background-clip: text;
  background-clip: text;
}

.scene {
  position: relative;
  width: 20vmin;
  height: 20vmin;
}

.light {
  width: 40vmin;
  height: 0;
  border-bottom: 1.8px solid;
  position: absolute;
  rotate: -20deg;
  right: 67%;
  top: 86%;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px #3cf) drop-shadow(0 0 9px #fff);
}

.glass {
  position: relative;
  width: 20vmin;
  height: 20vmin;
  border-bottom: 1px solid;
  z-index: 5;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 10px #3cf) drop-shadow(0 0 15px #fff);
  background-image: conic-gradient(at 50% 15%, #0000 150deg, #ffffff05 60deg 210deg, #0000 0deg);
}
.glass:before, .glass:after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  width: 100%;
  height: 0;
  top: 100%;
  border-top: 1px solid;
  rotate: -60deg;
  transform-origin: top left;
}
.glass:after {
  rotate: 60deg;
  transform-origin: top right;
}

.ref1 {
  position: absolute;
  width: 10.5vmin;
  height: 5vmin;
  right: 4.1vmin;
  top: 40%;
  clip-path: polygon(0 0, 70% 0%, 100% 100%, 0% 100%);
  background-image: conic-gradient(from 0deg at -15% 50%, #0000 84deg, red 85deg, #ff9a00 86deg, #d0de21 87deg, #4fdc4a 88deg, #3fdad8 89deg, #2fc9e2 90deg, #1c7fee 91deg, #5f15f2 92deg,.........完整代码请登录后点击上方下载按钮下载查看

网友评论0