html css 动漫网页设计
时间: 2023-09-21 18:07:13 浏览: 215
关于动漫的HTML网页设计
好的,下面是一个简单的动漫风格网页设计示例,仅供参考:
HTML代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>动漫网页设计</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<h1>动漫网页设计</h1>
</header>
<nav>
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">分类</a></li>
<li><a href="#">排行榜</a></li>
<li><a href="#">关于我们</a></li>
</ul>
</nav>
<section>
<article>
<h2>最新文章</h2>
<ul>
<li>
<a href="#">
<img src="https://via.placeholder.com/150x100" alt="文章图片">
<h3>文章标题</h3>
<p>文章简介</p>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/150x100" alt="文章图片">
<h3>文章标题</h3>
<p>文章简介</p>
</a>
</li>
<li>
<a href="#">
<img src="https://via.placeholder.com/150x100" alt="文章图片">
<h3>文章标题</h3>
<p>文章简介</p>
</a>
</li>
</ul>
</article>
<aside>
<h2>热门标签</h2>
<ul>
<li><a href="#">标签1</a></li>
<li><a href="#">标签2</a></li>
<li><a href="#">标签3</a></li>
<li><a href="#">标签4</a></li>
<li><a href="#">标签5</a></li>
</ul>
</aside>
</section>
<footer>
<p>版权所有 © 2021 动漫网页设计</p>
</footer>
</body>
</html>
```
CSS代码:
```css
body {
background-color: #f5f5f5;
font-family: Arial, sans-serif;
}
header {
background-color: #03a9f4;
color: #fff;
padding: 20px;
text-align: center;
}
h1 {
font-size: 48px;
margin: 0;
}
nav {
background-color: #ddd;
padding: 10px;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
li {
display: inline-block;
margin-right: 20px;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
color: #03a9f4;
}
section {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 20px;
}
article {
flex-basis: 70%;
margin-bottom: 20px;
}
h2 {
font-size: 24px;
margin: 0 0 20px;
}
ul li img {
float: left;
margin-right: 20px;
}
h3 {
font-size: 18px;
margin: 0;
}
p {
font-size: 14px;
margin: 0;
}
aside {
flex-basis: 25%;
}
footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
```
效果图:
![动漫网页设计效果图](https://i.loli.net/2021/06/08/3QmYwZv8GK2F7Uj.png)
阅读全文