(图标和logo均来自b站)
/*HTML部分*/
<div id="head">
<nav>
<h1>
<a href="">可我不吃肉</a>
</h1>
<div class="nav-list">
<ul>
<li>
<a href="">主页</a>
</li>
<li>
<a href="">QQ</a>
</li>
<li>
<a href="">微博</a>
</li>
<li>
<a href="">与我联系</a>
</li>
<li>
<a href="">更多</a>
</li>
</ul>
</div>
</nav>
</div>
<div id="main">
<div class="head-pic"></div>
<h2>可我不吃肉</h2>
<p>自先沉稳 而后爱人</p>
<div class="list">
<ul>
<li>
<a href="">主页</a>
</li>
<li>
<a href="">QQ</a>
</li>
<li>
<a href="">微博</a>
</li>
<li>
<a href="">与我联系</a>
</li>
</ul>
</div>
</div>
/*css部分*/
body{
margin: 0;
background:url(images/infocenterbg.a1a0d152.jpg) no-repeat ;
background-size: 100%/100%;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
}
ul,h1,h2,h3,p{
margin: 0;
}
ul{
list-style: none;
padding-left: 0;
}
a{
display: block;
width: 100%;
height: 100%;
text-decoration: none;
color:#f5f5f5;
}
/* 头部导航栏 */
#head{
width: 100%;
min-width: 1200px;
height: 44px;
background-color: rgba(0, 0, 0, 0.404);
}
nav{
width: 1200px;
height: 100%;
margin:0 auto;
}
nav>h1{
float: left;
width: 32px;
height: 100%;
}
nav>h1>a{
display: block;
width: 100%;
height: 100%;
background: url(images/favicon.ico) no-repeat center;
text-indent: -999px;
}
nav>.nav-list{
float:right;
width: 800px;
height: 100%;
}
.nav-list li{
float: left;
width: 148px;
height: 100%;
line-height: 44px;
text-align: center;
}
.nav-list li+li{
margin-left: 15px;
}
.nav-list li>a:hover{
color: rgb(129, 167, 218);
}
.nav-list li:hover{
background-color: #555;
}
/* 头部导航栏结束 */
/* 主体部分 */
#main{
width: 80%;
height: 240px;
background-color: rgba(0,0,0,.3);
margin:150px auto;
border-radius: 10px;
border:1px solid #abcdab;
}
/* 头像 */
#main>.head-pic{
width: 50px;
height: 50px;
border-radius: 50%;
margin:20px auto 0;
overflow: hidden;
background: url(http://photo.chaoxing.com/p/101557021_80?temp=1581334176348) no-repeat center;
transition: .8s linear;
}
.head-pic:hover{
transform: rotate(360deg);
}
#main>h2,p{
color: #f5f5f5;
text-align: center;
}
#main>h2{
font-size: 26px;
line-height: 40px;
font-family: '楷体';
}
#main>p{
font-size: 18px;
color:thistle;
}
#main>.list{
width: 68%;
height: 40px;
margin:1.5em auto;
border-radius: 8px;
}
.list>ul>li{
float: left;
width: 22%;
height: 100%;
background-color:#444;
opacity: .8;
border-radius: 5px;
text-align: center;
line-height: 40px;
}
.list>ul>li+li{
margin-left:1em;;
}
.list a{
color:violet;
}
.list a:hover{
color:rgb(207, 172, 172);
}