纯css布局实现试管容器效果

代码语言:html

所属分类:布局界面

代码描述:纯css布局实现试管容器效果

代码标签: 实现 试管 容器 效果

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

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

<style>
@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600&display=swap");
* {
  /*border:solid 1vh red;*/
  font-family: "Baloo 2", cursive;
}

body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background: #333333;
}

h1 {
  color: #e0f6ef;
  text-align: center;
  padding: 1vh;
  z-index: 10;
}

.container {
  max-width: 1010px;
  margin: auto;
  position: realtive;
  z-index: 10;
}

h2 {
  /*月份*/
  position: absolute;
  top: 72%;
  color: rgba(255, 255, 255, 0.5);
  z-index: 20;
  font-size: 30px;
  writing-mode: horizontal-tb;
}

.shadow {
  /*試管口*/
  position: relative;
  width: 70px;
  height: 10px;
  background: #e0f6ef;
  margin: 5px auto;
  margin-bottom: 0;
  padding: 0;
  top: 0%;
  left: 0%;
  border-radius: 30px;
  /*陰影*/
}
.shadow:before {
  content: "";
  position: absolute;
  top: 3200%;
  left: 0;
  background: rgba(0, 0, 0, 0.3);
  width: 50px;
  height: 10px;
  margin: 10px;
  border-radius: 50%;
}

.bottle {
  display: inline-block;
  margin-top: 100px;
}

.box {
  position: relative;
  width: 60px;
  height: 300px;
  margin: 10px;
  margin-top: 0;
  padding: 0;
  /*border-left: 2px solid $bottle;
  border-right: 2px solid $bottle;
  border-bottom: 2px solid $bottle;*/
  border-radius: 0 0 60px 60px;
  overflow: hi.........完整代码请登录后点击上方下载按钮下载查看

网友评论0