繁星露营地布局效果

代码语言:html

所属分类:布局界面

代码描述:繁星露营地布局效果

代码标签: 布局 效果

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


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

<style>
:root {
  --sky: #010641;
  --gradient-bg: linear-gradient(180deg, rgba(97,77,102,1) 0%, rgba(1,6,65,1) 83%);
  --tree-a: #0e134f;
  --tree-b: #6c5665;
  --mountain: linear-gradient(180deg, rgba(90,80,121,1) 0%, rgba(34,40,104,1) 83%);
  --shadow: #020836;
  --sun: #fdc3aa;
  --growfly: #a57d7a;
  --light: #f9b12f;
  --tent-a: #4c5c9a;
  --tent-b: #252b65;
}

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  overflow: hidden;
}

body {
  background-color: var(--sky);
}

.canvas {
  position: relative;
  border-radius: 50%;
  width: 600px;
  height: 600px;
  background-color: var(--sky);
  overflow: hidden;
  flex-shrink: 0;
}

.floor {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 180px;
  background: var(--gradient-bg);
  z-index: 2;
}

.tree {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 280px solid var(--tree-a);
  z-index: 3;
}
.tree:before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-bottom: 280px solid var(--shadow);
  border-left: 50px solid transparent;
  -webkit-transform: translatex(-100%);
          transform: translatex(-100%);
}
.tree:after {
  position: absolute;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-top: 180px .........完整代码请登录后点击上方下载按钮下载查看

网友评论0