新手网站模板_网站新手教程

哆啦Ai流程自动化发布于:2023-05-10 04:04热度:483 ℃
点赞92收藏

以下是一个简单的新手网站模板,你可以根据自己的需要进行修改和定制。
HTML代码:
```html




新手网站





欢迎来到我的新手网站





欢迎来到我的新手网站


这是一个介绍我自己的博客,我会在这里分享我的经历和知识。







```
CSS代码:
```css
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
header {
background-color: #007bff;
color: #fff;
padding: 20px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.logo {
width: 200px;
height: 50px;
background-image: url('logo.png');
background-size: cover;
margin-top: 50px;
}
.title {
color: #fff;
text-align: center;
margin-top: 50px;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
margin-right: 10px;
}
nav a {
color: #007bff;
text-decoration: none;
}
main {
width: 80%;
margin: 0 auto;
padding: 20px;
}
section {
display: flex;
flex-wrap: wrap;
}
.content {
width: 80%;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
margin-bottom: 30px;
}
h1 {
margin-bottom: 20px;
font-size: 36px;
color: #007bff;
}
p {
margin-bottom: 20px;
}
.footer {
width: 100%;
text-align: center;
padding: 20px;
background-color: #007bff;
color: #fff;
font-size: 14px;
text-shadow: 2px 2px #007bff;
}
```
这个模板包含了一个头部元素、一个导航栏、一个主体内容和一个底部元素。CSS样式控制了页面的布局、颜色、边框和阴影等。你可以根据需要进行修改和定制。