css实现装满尺子与笔的笔筒效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现装满尺子与笔的笔筒效果代码

代码标签: css 装满 尺子 笔筒

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
  
<style>
*, *::before, *::after {
  margin: 0;
  box-sizing: border-box;
}

*::before, *::after {
  content: "";
  display: flex;
}

body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d4e7ff;
}

.container {
  transform: scale(1.6);
}

.cup-contents {
  display: flex;
  justify-content: space-around;
  transform: translateY(23px);
}

.cup {
  height: 60px;
  width: 58px;
  position: relative;
  border: 3px solid #fdc4ec;
  border-radius: 0 0 2px 2px;
  background-image: linear-gradient(to right, #ffe4ed 0 50%, #fff8fa 50%);
}
.cup::before {
  height: 5.8px;
  width: 63.8px;
  border-radius: 1.5px;
  background-image: linear-gradient(#fff8fa 0 50%, #fdc4ec 50%);
  transform: translateY(-5px) translateX(-5px);
}
.cup::after {
  height: 11.6px;
  width: 46.4px;
  border-radius: 0 0 1px 1px;
  border-right: 3px solid #fdc4ec;
  border-left: 3px solid #fdc4ec;
  border-bottom: 3px solid #fdc4ec;
  background-image: linear-gradient(to right, #ffe4ed 0 50%, #fff8fa 50%);
  transform: translateY(48px) translateX(3px);
}

.ruler {
  height: 95px;
  width: 18px;
  border-radius: 1px;
  position: relative;
  z-index: 0;
  transform: translateX(-5px) translateY(-15px) rotate(-8deg);
  background-image: linear-gradient(to right, #ffc061 0 50%, #ffd494 50%);
  animation: ruler-animation 5s infinite;
}
.ruler::before {
  height: 95px;
  width: 10.8px;
  transform: translateY(5px);
  background-image: repeating-linear-gradient(to bottom, transparent, transparent 7%, #5796e9 7%, #5796e9 8.5%);
}
.ruler::after {
  height: 4.5px;
  width: 4.5px;
  border-radius: 50%;
  background-color: #d4e7ff;
  transform: translateY(-92px) translateX(6.5px);
}

.pen {
  height: 65px;
  width: 8px;
  border-radius: 1px;
  background-image: linear-gradient(to right, #ff92c9 0 50%, #fcbfe9 50%);
  transform: translateX(-6px) translateY(20px);
  ani.........完整代码请登录后点击上方下载按钮下载查看

网友评论0