svg+css实现逼真水滴水珠效果代码

代码语言:html

所属分类:布局界面

代码描述:svg+css实现逼真水滴水珠效果代码

代码标签: svg css 逼真 水滴 水珠

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

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

<head>
   
<meta charset="UTF-8">
<style>
    /* I don't even know why I added sass */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

.paper {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
}
.paper::before {
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  filter: url(#paper);
}
.paper::after {
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  background-image: linear-gradient(190deg, rgba(201, 201, 201, 0.1), rgba(85, 85, 85, 0.4));
}

.dropplets {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateZ(8deg);
}

.dropplet {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: absolute;
}
.dropplet:nth-child(1) {
  top: calc(50% - 130px);
  left: calc(50% + 110px);
}
.dropplet:nth-child(1)::after {
  content: '';
  top: -25px;
  left: -55px;
  position: absolute;
  width: 80px;
  height: 75px;
  border-radius: 50% 50% 50% 50% / 50% 50% 45% 45%;
  background-image: radial-gradient(ellipse at center, white 40%, transparent 60%);
  background-size: 10px 6px;
  background-position: 60% 25%;
  background-repeat: no-repeat;
  box-shadow: inset 14px 0px 5px -10px rgba(0, 0, 0, 0.2), inset 13px 0px 2px -10px rgba(0, 0, 0, 0.2), inset 0px -3px 5px 0px rgba(250, 241, 220, 0.5), inset 0px -20px 10px 1px rgba(255, 255, 255, 0.3), inset -20px 10px 5px -20px rgba(0, 0, 0, 0.3), inset -20px 15px 10px -20px rgba(0, 0, 0, 0.2), inset 0px 20px 30px -5px rgba(0, 0, 0, 0.3), 0px 2px 1px -1px rgba(245, 227, 183, 0.8), -16px 13px 5px -20px black, 17px 13px 5px -20px black, 15px 19px 5px -20px black, -2px 34px 1px -30px rgba(0, 0, 0, 0.4), -2px 35px 3px -30px rgba(255, 255, 255, 0.3), -1px 16px 3px -5px rgba(0, 0, 0, 0.5), -1px 21px 3px -5px rgba(0, 0, 0, 0.4), 1px -1px 5px 0px rgba(50, 50, 50, 0.5);
}
.dropplet:nth-child(1)::before {
  content: '';
  top: -25px;
  left: -55px;
  position: absolute;
  width: 80px;
  height: 75px;
  border-radius: 50% 50% 50% 50% / 50% 50% 45% 45%;
  background-color: red;
  filter: url(#water);
}
.dropplet:nth-child(2)::after {
  content: '.........完整代码请登录后点击上方下载按钮下载查看

网友评论0