CSS创意网站模板是基于CSS(层叠样式表)设计的网站布局和样式的一种预设方案。它允许开发者或设计师快速搭建具有独特视觉效果和用户体验的网站,而无需从头开始编写所有的CSS代码。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Creative CSS Template</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="header">
<h1>Welcome to My Creative Website</h1>
<nav class="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main class="main-content">
<section class="hero">
<h2>Discover Our Services</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</section>
<section class="services">
<h3>Our Services</h3>
<ul>
<li>Web Design</li>
<li>Graphic Design</li>
<li>SEO Optimization</li>
</ul>
</section>
</main>
<footer class="footer">
<p>© 2023 My Creative Website. All rights reserved.</p>
</footer>
</body>
</html>
/* styles.css */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
.nav ul {
list-style-type: none;
padding: 0;
}
.nav ul li {
display: inline;
margin-right: 20px;
}
.nav ul li a {
color: #fff;
text-decoration: none;
}
.main-content {
padding: 20px;
}
.hero {
background-color: #f4f4f4;
padding: 20px;
text-align: center;
}
.services {
margin-top: 20px;
}
.footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px 0;
position: fixed;
bottom: 0;
width: 100%;
}
领取专属 10元无门槛券
手把手带您无忧上云