div+css布局实现一个爱心瓶效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现一个爱心瓶效果代码

代码标签: 一个 爱心 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
body{
    margin: 0;
    padding: 0;
    background: #FCD9E2;
}
.box{
    position: relative;
    display: block;
    margin: auto;
    margin-top: 8%;
    width: 600px;
    height: 420px;
}
.bottle{
    position: absolute;
    width: 30%;
    height: 60%;
    left: 33%;
    bottom: 5%;
    background: #ffffff;
    border: 7px solid #37B0C1;
    border-top: none;
    border-radius: 60px 60px 30px 30px;
}
.top-part{
    position: absolute;
    width: 52%;
    height: 25%;
    left: 20.5%;
    top: -24%;
    background: #ffffff;
    border: 7px solid #37B0C1;
    border-top: none;
    border-bottom: none;
}
.part-1{
    position: absolute;
    width: 70%;
    height: 10%;
    left: 12%;
    top: -30%;
    background: #ffffff;
    border: 7px solid #37B0C1;
    border-radius: 30px;
}
.potion{
    position: absolute;
    width: 90%;
    height: 55%;
    left: 5%;
    bottom: 5%;
    background: #F01A50;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}
.particle{
    position: absolute;
    width: 5px;
    height: 5px;
    left: 10%;
    bottom: 20%;
    background: #B4093B;
    border-radius: 50%;
}
.particle:nth-child(2), .particle:nth-child(4), .particle:nth-child(5){
    width: 10px;
    height: 10px;
    left: 25%;
    bottom: 30%;
}
.particle:nth-child(3){
    left: 50%;
    bottom: 15%;
}
.particle:nth-child(4){
    left: 45%;
    bottom: 40%;
}
.particle:nth-child(5){
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0