css自己定义
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
a{
text-decoration: none;
}
/* 隐藏内容中的header */
/* 隐藏内容中的底部 */
#home #header {
display: none;
}
#home #footer {
display: none;
}
/* 头部样式 */
#header{
position: fixed;
top: 0;
left: 50%;
z-index: 9999;
width: 1200px;
height: 56px;
margin-left: -600px;
background: #3a3a3a;
}
#header::after,
#header::before {
position: absolute;
top: 0;
content: '';
width: 50%;
height: 100%;
background-color: #3a3a3a;
}
#header::after {
right: -50%;
}
#header::before {
left: -50%;
}
#header a{
color: #fff;
}
/* 左侧标题 */
#blogTitle{
float: left;
height: 56px;
}
#blogTitle #lnkBlogLogo{
display: none;
}
#blogTitle h1{
height: auto;
}
#blogTitle #Header1_HeaderTitle{
display: block;
margin: 10px 0 3px;
line-height: 20px;
font-size: 16px;
}
#blogTitle h2{
line-height: 16px;
font-size: 12px;
color: #fff;
}
/* 右侧导航 */
#navigator{
float: right;
}
#navigator #navList li{
float: left;
}
/* 隐藏文章个数 */
#navigator .blogStats{
display: none;
}
/* 导航样式 */
#navigator #navList li{
float: left;
line-height: 56px;
}
#navList li a{
display: block;
padding: 0 15px;
}
#navList li a:hover{
color: #00bbee;
background: #4a4a4a;
}
/* 底部样式 */
#footer {
margin: 0;
padding: 30px 0 50px 0;
color: #fff;
text-align: center;
background: #1e1b29;
border-top: 1px solid #05A6F3;
}
#footer i {
display: block;
line-height: 20px;
font-size: 16px;
font-style: normal;
}
#footer p {
line-height: 30px;
}
/* 首页文章列表 */
#home{
width: 1200px;
margin: 56px auto 30px;
}
#mainContent .day{
padding: 30px 0;
position: relative;
}
#mainContent .day a:hover{
color: #00bbee !important;
}
#mainContent .day .dayTitle{
position: absolute;
right: 0;
bottom: 30px;
}
#mainContent .day .dayTitle a{
font-size: 14px;
color: rgba(0,0,0,.65);
}
#mainContent .postTitle{
padding-bottom: 10px;
line-height: 28px;
text-indent: 2em;
}
#mainContent .postTitle a{
color: #108ee9;
font-size: 16px;
}
#mainContent .postCon .c_b_p_desc{
padding-bottom: 10px;
line-height: 24px;
font-size: 14px;
color: rgba(0,0,0,.5);
text-indent: 2em;
}
#mainContent .postCon .c_b_p_desc a{
color: rgba(0,0,0,.5);
}
#mainContent .postCon .c_b_p_desc i{
display: inline-block;
text-indent: 0;
}
#mainContent .postCon .c_b_p_desc i::after{
content: "...";
display: inline-block;
margin-right: 10px;
}
#mainContent .postDesc,
#mainContent .day .postDesc a {
color: #B7B7B7;
}
#mainContent .day .postDesc{
font-size: 14px;
}
#nav_next_page a{
display: block;
float: right;
padding: 0 15px;
line-height: 30px;
color: #00bbee;
font-size: 14px;
border-radius: 3px;
border: 1px solid #00bbee;
}
#nav_next_page a:hover{
color: #fff;
background: #00bbee;
border: 1px solid #00bbee;
}
/* 列表页显示分页 */
/* 隐藏头部的分页 */
#homepage_top_pager{
display: none;
}
#homepage1_HomePageDays_homepage_bottom_pager .pager{
font-size: 14px;
color: #00bbee;
}
#homepage1_HomePageDays_homepage_bottom_pager .pager a{
display: inline-block;
padding: 0 15px;
margin: 0 8px;
line-height: 30px;
color: #00bbee;
font-size: 14px;
border-radius: 3px;
border: 1px solid #00bbee;
}
#homepage1_HomePageDays_homepage_bottom_pager .pager a:hover{
color: #fff;
background: #00bbee;
border: 1px solid #00bbee;
}
/* 隐藏 */
#sideBar{
display: none;
}
# 头部
```html
<div id="header">
<div id="blogTitle">
<a id="lnkBlogLogo" href="http://www.cnblogs.com/tsjz/">
<img id="blogLogo" src="/Skins/custom/images/logo.gif" alt="返回主页">
</a>
<h1>
<a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/tsjz/">出涉水的零壹</a>
</h1>
<h2>一步一个脚印,走出高度...</h2>
</div>
<div id="navigator">
<ul id="navList">
<li>
<a id="blog_nav_sitehome" class="menu" href="http://www.cnblogs.com/">博客园</a>
</li>
<li>
<a id="blog_nav_myhome" class="menu" href="http://www.cnblogs.com/tsjz/">首页</a>
</li>
<li>
<a id="blog_nav_newpost" class="menu" rel="nofollow" href="https://i.cnblogs.com/EditPosts.aspx?opt=1">新随笔</a>
</li>
<li>
<a id="blog_nav_contact" class="menu" rel="nofollow" href="https://msg.cnblogs.com/send/%E5%88%9D%E6%B6%89%E6%B0%B4%E7%9A%84%E9%9B%B6%E5%A3%B9">联系</a>
</li>
<li>
<a id="blog_nav_rss" class="menu" href="http://www.cnblogs.com/tsjz/rss">订阅</a>
</li>
<li>
<a id="blog_nav_admin" class="menu" rel="nofollow" href="https://i.cnblogs.com/">管理</a>
</li>
</ul>
<div class="blogStats">
<div id="blog_stats">
<span id="stats_post_count">随笔 - 14 </span>
<span id="stats_article_count">文章 - 6 </span>
<span id="stats-comment_count">评论 - 0</span>
</div>
</div>
</div>
</div>
底部
<div id="footer">
<i>ZAHI TANG</i>
<p>Copyright ©2018 初涉水的零壹</p>
</div>