css+svg实现帆船在海上航行效果代码
代码语言:html
所属分类:布局界面
代码描述:css+svg实现帆船在海上航行效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*,
::before,
::after {
padding: 0;
margin: 0;
box-sizing: border-box;
}
html {
font-size: 10px;
}
body {
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
background-color: #303030;
overflow: hidden;
}
.container {
height: 400px;
width: 400px;
/* border: 1px solid red; */
display: flex;
justify-content: center;
align-items: flex-end;
position: relative;
}
.boat {
height: 5em;
width: 20em;
background-color: #a36a38;
/* clip-path: polygon(0% 0%, 100% 0%, 90% 70%, 80% 100%, 20% 70%, 10% 10%); */
border-radius: 0 0 100% 100%;
position: relative;
bottom: 20px;
}
.boat::before {
content: "";
height: 1.5rem;
width: 13rem;
background-color: red;
position: absolute;
top: -1.5rem;
left: 50%;
transform: translate(-50%);
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0