div+css实现山底夕阳下小船水面航行扬帆起航动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现山底夕阳下小船水面航行扬帆起航动画效果代码

代码标签: div css 山底 夕阳 小船 水面 航行 扬帆 起航 动画

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

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
    margin: 0;
    padding: 0;
}
.container{
    width: 100%;
    min-height: 100vh;
    position: relative;
    background-image: url('//repo.bfw.wiki/bfwrepo/images/huazuo/background.jpg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.container .ocean{
    height: 220px;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}
.container .ocean .water{
    height: 100%;
    position: absolute;
    right: 0px;
    animation: water-move 10s linear infinite;
}
@keyframes water-move{
    0%{
        transform: translateX(0);
    }
    100%{
        transform: translateX(1000px);
    }
}
.container .ocean .boat{
    width: 350px;
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-box-reflect: below 0 linear-gradient(rgba(255,255,255,0.1),rgba(255,255,255,0.6));
    animation: boat-move 2s linear infinite;
}
@keyframes boat.........完整代码请登录后点击上方下载按钮下载查看

网友评论0