帮我设计一个网站的css,要简约风格
时间: 2024-05-19 19:16:04 浏览: 20
以下是一个简约风格的网站CSS设计:
body {
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
color: #333;
background-color: #fff;
}
.container {
max-width: 1024px;
margin: 0 auto;
padding: 0 20px;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 0;
border-bottom: 1px solid #eee;
}
.logo {
font-size: 32px;
font-weight: bold;
color: #333;
}
.nav {
display: flex;
justify-content: center;
align-items: center;
}
.nav a {
display: block;
margin: 0 10px;
font-size: 18px;
font-weight: bold;
color: #333;
text-decoration: none;
}
.nav a:hover {
color: #666;
}
.hero {
text-align: center;
padding: 100px 0;
background-image: url('hero.jpg');
background-size: cover;
background-position: center;
}
.hero h1 {
font-size: 48px;
font-weight: bold;
color: #fff;
text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
margin-bottom: 20px;
}
.hero p {
font-size: 24px;
color: #fff;
text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
}
.section {
padding: 100px 0;
border-bottom: 1px solid #eee;
}
.section h2 {
font-size: 36px;
font-weight: bold;
color: #333;
margin-bottom: 20px;
}
.section p {
font-size: 18px;
color: #666;
line-height: 1.8;
margin-bottom: 20px;
}
.section .button {
display: inline-block;
padding: 10px 20px;
font-size: 18px;
font-weight: bold;
color: #fff;
background-color: #333;
border: none;
border-radius: 5px;
text-decoration: none;
}
.section .button:hover {
background-color: #666;
}
.footer {
padding: 20px 0;
background-color: #333;
color: #fff;
text-align: center;
}
.footer p {
margin: 0;
}
.footer a {
color: #fff;
text-decoration: none;
}
.footer a:hover {
text-decoration: underline;
}