css实现弧形头部效果
代码语言:html
所属分类:菜单导航
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Curved Header with SVG</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<style>
@keyframes fadeIn {
to {
opacity: 1;
transform: translateY(0);
}
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.fadeInClass {
animation: fadeIn 1s ease-out forwards;
}
.text-center {
text-align: center;
}
.text-2 {
font-size: 1.8rem;
}
.margin-bottom--3 {
margin-bottom: 3rem;
}
.margin-y--5 {
margin-top: 5rem;
margin-bottom: 5rem;
}
.page-container {
max-width: 100%;
margin: 60px auto 0;
background: white;
}
.content-container {
width: 726px;
margin: 0 auto;
}
@media (max-width: 726px) {
.content-container {
width: 100%;
padding: 0 1rem;
}
}
.navbar {
width: 100%;
height: 60px;
box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.11);
position: fixed;
top: 0;
z-index: 1000;
background: white;
}
.banner {
height: 368px;
overflow: hidden;
position: relative;
}
@media (max-width: 726px) {
.banner {
height: 300px;
}
}
@media (max-width: 400px) {
.banner {
height: 200px;
}
}
.banner .banner_img-wrapper {
position: relative;
width: 100%;
height: 99%;
display: block;
}
.banner .banner_img-wrapper:after {
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
opacity: .7;
content: "";
width: 100%;
height: 100%;
background-image: linear-gradient(165deg, #00274C, #445339, #FFCB05);
}
.banner .banner_text {
margin: -288px auto 0;
max-width: 726px;
position: relative;
color: white;
opacity: 0;
transform: translateY(5px);
animation: fadeIn 1s ease-out forwards;
}
@media (max-width: 726px) {
.banner .banner_text {
margin: -240px auto 0;
padding: 0 1rem;
}
}
@media (max-width: 400px) {
.banner .banner_text {
ma.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0