js实现拉开百叶窗看看窗外美景效果代码

代码语言:html

所属分类:拖放

代码描述:js实现拉开百叶窗看看窗外美景效果代码

代码标签: 百叶窗 看看 窗外 美景 效果

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


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

<head>

 
<meta charset="UTF-8">
 

 
 
 
<style>
:root {
  --slat-border:2px;
  --slat-rotation:rotateX(-85deg);
  --string-color:dimgray;
}
* {
  box-sizing:border-box;
}

html {
  background:url('//repo.bfw.wiki/bfwrepo/image/5fc8aa82a7330.png');
  /*   background:url('https://media1.tenor.com/images/1653820f3e094d991bd77532a1b5c624/tenor.gif?itemid=7344272'); */
  background-size:cover;
  background-position:center bottom;
  min-height:100vh;
  /*   background-position:50% 0; */
}
body {
  margin:0;
  padding:0;
}

img {
  position: absolute;
  left: 41%;
  top: 41%;
}
#window_container {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  left:0;
}
#window_container:before {
  content:'';
  width:2px;
  height:100%;
  background:var(--string-color);
  position:absolute;
  top:0;
  left:1em;
  box-shadow:0 -2px 10px rgba(0,0,0,.5);
}
#window_container:after {
  content:'';
  width:2px;
  height:100%;
  background:var(--string-color);
  position:absolute;
  top:0;
  left:calc(100% - 1em);
  box-shadow:0 -2px 10px rgba(0,0,0,.5);
  z-index:-1;
}

.open_blinds .blind_slat {
  animation:open_blinds .5s linear forwards;
}

.blind_slat {
  width:100%;
  height:10vh;
  background:
    radial-gradient(ellipse, lightgray 75%, transparent 75%),
    radial-gradient(ellipse, lightgray 75%, transparent 75%),
    url("https://www.transparenttextures.com/patterns/retina-wood.png"),
    linear-gradient(to bottom, gray 5%, ivory 20%, #aaa);
  background-size:10px 35px, 10px 35px, auto auto, auto auto;
  background-repeat:no-repeat,no-repeat,repeat,repeat;
  background-position:.75em 60%, calc(100% - .65em) 60%, 0 0, 0 0;
  backdrop-filter:blur(8px);
  /*   border-bottom:var(--slat-border) solid lightgray; */
  box-shadow:0 10px 10px rgba(0,0,0,.25);  
  position:relative;
}

.blind_slat:before {
  content:'';
  width:2px;
  height:74%;
  background:var(--string-color);
  position:absolute;
  left:1em;
  box-shadow:0 0 5px rgba(0,0,0,.5);
}
.blind_slat:after {
  content:'';
  width:2px;
  height:74%;
  background:var(--string-color);
  position:absolute;
  left:calc(100.........完整代码请登录后点击上方下载按钮下载查看

网友评论0