什么都可以
时间: 2024-02-18 07:05:55 浏览: 54
怀孕计算器 什么都可以算 ^_^
5星 · 资源好评率100%
好的,以下是一个示例的短文页面的HTML和CSS代码,您可以根据自己的需求进行修改:
HTML代码:
```
<!DOCTYPE html>
<html>
<head>
<title>优美的短文</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<h1>优美的短文</h1>
<nav>
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">分类</a></li>
<li><a href="#">关于我们</a></li>
</ul>
</nav>
</header>
<main>
<article>
<h2>文章标题</h2>
<p>这里是文章的内容,可以包含多行文字。Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam commodo magna ac nunc eleifend, vitae varius erat commodo. Suspendisse potenti. Sed ultrices orci a est ultricies, a laoreet felis viverra. Nullam in erat in nisi elementum commodo non vel justo. Maecenas dictum, nibh in dapibus luctus, purus mauris iaculis enim, a scelerisque mi ex a dui. Etiam tristique elit ut ex mattis, in tristique sapien posuere. Cras elementum, mauris vitae dictum ultricies, metus ante lacinia metus, id mattis ex velit a ex. Sed eget libero eget massa dapibus lobortis. Ut blandit, dolor sed pharetra malesuada, magna eros condimentum purus, a sollicitudin orci lorem vel nibh.</p>
<p>这里是文章的内容,可以包含多行文字。Nullam varius eleifend ex, sit amet semper tortor accumsan ac. Sed commodo mi in nisi hendrerit, sed interdum nisi cursus. Sed sollicitudin, erat vel blandit pharetra, est felis blandit mi, at commodo elit velit euismod ex. Nunc tincidunt nulla ac enim pellentesque, vel dapibus augue convallis. Vivamus tempor enim vel nulla bibendum, vel luctus lectus lacinia. Sed auctor, elit vel dignissim mattis, elit mi pretium erat, et eleifend ante eros in diam. Donec tellus urna, vestibulum vitae ex vel, cursus condimentum ex. Sed commodo, dui vel vestibulum pretium, mauris odio dignissim massa, quis imperdiet quam augue sit amet lorem. Fusce vestibulum, lectus at ullamcorper pulvinar, risus felis tincidunt mauris, eu laoreet justo odio a odio. Sed nec interdum nisi. </p>
</article>
</main>
<footer>
<p>版权所有 © 2021 短文网站</p>
</footer>
</body>
</html>
```
CSS代码:
```
/* 全局样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
margin: 0;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* header样式 */
header {
background-color: #eee;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
header h1 {
margin: 0;
font-size: 36px;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
}
nav li {
margin-right: 20px;
}
nav a {
font-size: 20px;
}
/* main样式 */
main {
padding: 20px;
}
article {
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
article h2 {
margin-bottom: 10px;
font-size: 28px;
}
article p {
line-height: 1.5;
margin: 0 0 20px 0;
}
/* footer样式 */
footer {
background-color: #eee;
padding: 20px;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
footer p {
margin: 0;
font-size: 14px;
color: #666;
}
```
您可以将上述代码保存为.html和.css文件,并在浏览器中打开.html文件查看效果。
阅读全文