css实现卡通海面波浪波动小船上水手动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现卡通海面波浪波动小船上水手动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
background-color: #b8ecfd;
}
.container {
position: relative;
background: #6ab8f9;
}
.container #sky {
height: 62.5vh;
width: 100%;
margin: 0;
padding: 0;
}
.container #sky .cloud {
margin: auto;
position: absolute;
bottom: 0;
left: 0;
top: 0;
right: 0;
right: 750px;
bottom: 150px;
height: 125px;
width: 125px;
border-radius: 50%;
background-color: white;
opacity: 0.6;
}
.container #sky .cloud:nth-of-type(2) {
bottom: 250px;
left: 1150px;
}
.container #sky .cloud::before {
content: "";
position: absolute;
left: 80px;
top: 40px;
height: 85px;
width: 85px;
border-radius: 50%;
background-color: white;
}
.container #sky .cloud::after {
content: "";
position: absolute;
left: -40px;
top: 35px;
height: 85px;
width: 85px;
border-radius: 50%;
background-color: white;
}
.container #ocean #boat-container {
animation: boatsway 3s ease-in-out infinite alternate;
}
@keyframes boatsway {
from {
transform: rotate(-5.5deg);
}
to {
transform: rotate(5.5deg);
}
}
.container #ocean #boat-container #boat {
margin: auto;
position: absolute;
bottom: 0;
left: 0;
top: 0;
right: 0;
top: 45px;
width: 400px;
height: 100px;
background-color: #225cee;
border-bottom-right-radius: 5rem;
border-bottom-left-radius: 5rem;
z-index: 3;
transform-style: preserve-3d;
}
.container #ocean #boat-container #boat::before {
content: "";
position: absolute;
height: 125px;
width: 125px;
left: 225px;
bottom: 0px;
border-top-left-radius: 4rem;
border-bottom-right-radius: 5rem;
background-colo.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0