css布局实现多个气球效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现多个气球效果代码

代码标签: css 气球

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
/*   background-color: #16202a; */
  background-image: linear-gradient(to bottom, #434343 0%, black 100%);
}

.balls-container {
  height: 50vw;
  width: 50vw;
  position: relative;
  max-width: 350px;
  max-height: 350px;
}

.ball {
  position: absolute;
  border-radius: 50% 50% 0 50%;
  transform: rotate(45deg);
}
.ball::before {
  content: '';
  height: 25%;
  width: 40%;
  position: absolute;
  transform: rotate(-90deg);
  border-radius: 50%;
  left: -3%;
  top: 35%;
  background-color: rgba(225, 225, 225, .6);
}
.ball::after {
  content: '';
  border-style: solid;
  border-width: 4.5vmin 2vmin 2.5vmin 2vmin;
  position: absolute;
  transform: rotate(-45deg);
  right: -1vmin;
  bott.........完整代码请登录后点击上方下载按钮下载查看

网友评论0