单个div布局实现下雨打伞效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div布局实现下雨打伞效果代码

代码标签: 实现 下雨 打伞 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
@import url("https://fonts.googleapis.com/css2?family=Exo:wght@500&display=swap");

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "Exo", sans-serif;
  font-weight: bold;
  background-color: #2d8fdc;
  color: white;
  text-shadow: none;
}

.rain {
  float: left;
  width: 400px;
  height: 400px;
  word-break: break-all;
  writing-mode: tb-rl;
  text-orientation: upright;
  overflow: hidden;
  transform: rotate(180deg);
}

.rain::before {
  content: "";
  shape-outside: circle(50%);
  width: 400px;
  height: 400px;
  float: left;
  shape-outside: ellipse(75px 152px at 50% 33%);
  background-image: linear-gradient(to right, black 0 100%),
    linear-gradient(to right, black 0 100%),
    linear-gradient(to right, black 0 100%),
    linear-gradient(to right, #2d8fdc 0 100%),
    radial-gradient(
      ellipse at 50% -25%,
      #2d8fdc 40%,
      #2d8fdc 60%,
      transparent 60%
    ),
    linear-gradient(to right, #ffea00 0 100%),
    radial-gradient(ellipse at 50% 100%, black 40%, black 60%, transparent 60%),
    linear-gradient(to right, black 0 100%),
    radial-gradient(ellipse at 50% 75%, black 40%, black 60%, transparent 60%),
    radial-gradient(ellipse at 50% 75%, black 40%, black 60%, transparent 60%),
    radial-gradient(
      ellipse at 50% 83%,
      #2d8fdc 40%,
      #2d8fdc 60%,
      transparent 60%
    ),
    linear-gradient(77deg, transparent 50%, black 0 100%),
    linear-gradient(-77deg, transparent 50%, black 0 100%),
    radial-gradient(
      ellipse at 50% -25%,
      #2d8fdc 40%,
      #2d8fdc 60%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 50% -25%,
      #2d8fdc 40%,
      #2d8fdc 60%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 50% -25%,
      #2d8fdc 40%,
      #2d8fdc 60%,
      transparent 60%
    ),
    radial-gradient(
      ellipse at 50% -25%,
      #ffea00 40%,
      #ffea00 60%,
      transparent 60%
    ),
    linear-gradient(77deg, transparent 50%, #ffea00 0 100%),
    linear-gradient(-77deg, transparent 50%, #ffea00 0 100%),
    radial-gradient(ellipse at 50% 18%, black 40%, black 60%, transparent 60%),
    radial-gradient(ellipse at 50% 18%, black 40%, black 60%, transparent 60%),
    linear-gradient(to right, black 0 100%),
    linear-gradient(to right, black 0 100%);
  background-position: 49.5% 17%, 49.5% 16.3%, 49.5% 15.6%, 50% 15.5%, 50% 17.8%,
    50% 21%, 50% 32%, 50% 24.8%, 46% 29%, 54% 29%, 50% 23%, 37% 23%, 63% 23%,
    90% 30%, 51% 30%, 10% 30%, 50% 40%, 49% 50%, 50.5% 50%, 39% 15.5%, 61% 15.5%,
    50% 15.5%, 50% 18%;
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0