div+css布局实现杨帆起航日落东方效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现杨帆起航日落东方效果代码

代码标签: 杨帆 起航 日落 东方效果 ( 东方 效果 )

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
:root {
  --hue:320deg; /* change hue of picture (320deg) */
  --orangered:orangered;
  --darkorange:darkorange;
  --orange:orange;
  --yellow:yellow;
  --black:black;  
}
* {
  box-sizing:border-box;
}
html {
  background:#788;
}

#canvas {
  position:relative;
  width:600px;
  height:400px;
  background:linear-gradient(to bottom, var(--darkorange) 25%, var(--yellow) 70%, var(--orange) 70%, var(--orangered));
  filter:hue-rotate(var(--hue));
  transform-origin:top center;
  transform:scale(1.5);
  margin:0 auto;
  box-shadow:0 5px 10px rgba(0,0,0,.4);
  border:20px solid white;
}
#canvas:before { /* texture-overlay */
  content:'';
  position:absolute;
  left:-20px;
  top:-20px;
  width:inherit;
  height:inherit;
  border:20px solid white;
  box-sizing:border-box;
  background:radial-gradient(circle, rgba(60,60,60,1) 1px, transparent 1px);
  background-size:3px 3px;
  z-index:2;
  mix-blend-mode:overlay;
  opacity:.25;
}
#canvas:after { /* border-overlay */
  content:'';
  position:absolute;
  left:-20px;
  top:-20px;
  width:inherit;
  height:inherit;
  border:20px solid beige;
  box-sizing:border-box;  
}

.sun {
  width:100px;
  height:100px;
  background:var(--yellow);
  border-radius:50%;
  position:absolute;
  left:45%;
  top:25%;
  filter:blur(1px);
}
.sun:after {
  content:'';
  width:100%;
  height:100%;
  background:var(--yellow);
  border-radius:50%;
  position:absolute;
  top:140%;
  left:0;
  opacity:.25;
  filter:blur(5px);
}

.boat {
  width:80px;
  height:10px;
  background:var(--black);
  z-index:1;
  position:absolute;
  top:67.5%;
  left:75%;
  border-radius:0 25% 50% 5px;
}
.boat:after {
  content:'';
  width:100%;
  height:100px;
  background:var(--black);
  position:absolute;
  bottom:100%;
  left:0;
  clip-path:polygon(33% 0%, 50% 80%, 66% 33%, 90% 100%, 50% 95%, 45% 100%, 50% 90%, 10% 95%, 0% 100%, 10% 90%)
}
.boat_reflection {
  width:80px;
  height:10px;
  background:var(--black);
  z-index:1;
  position:absolute;
  top:70.5%;
  left:75.5%;
  border-radius:0 25% 50% 5px;
  transform:scaleY(-1) skewX(-20deg);
  opacity:.25;
  filter:blur(2px);
}
.boat_reflection:after {
  content:'';
  width:100%;
  height:100px;
  background:linear-gradient(to top, var(--black), transparent);
  position:absolute;
  bottom:100%;
  left:0;
  clip-path:polygon(33% 0%, 50% 80%, 66% 33%, 90% 100%, 50% 95%, 45% 100%, 50% 90%, 10% 95%, 0% 100%, 10% 90%)
}

.ground {
  width:60%;
  height:125px;
  background:var(--black);
  position:absolute;
  bottom:0;
  left:0;
  clip-path:polygon(0% 0%, 25% 10%, 80% 85%, 100% 100%, 0% 100%);
}
.tree {
  width:150px;
  height:200p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0