前端开发入门教程,web前端零基础html5 +css3+前端项目视频教程

《新浪导航案例》
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
/* 块级的默认宽度是网页的100% */
height: 40px;
background: #fff;
border-top: 3px solid #ff8500;
border-bottom: 1px solid #ededf0;
}
/* 后代:box里面的a */
.box a{
width: 80px;
height: 40px;
/* 行内块元素 */
display: inline-block;
/* 设置文字对齐方式 */
text-align: center;
/* 设置行高 */
line-height: 40px;
/* 去除下划线 */
text-decoration: none;
color: black;
font-size: 12px;
}
.box a:hover{
color: orange;
background-color: #ededf0;
}
</style>
</head>
<body>
<div class="box">
<a href="">新浪导航</a>
<a href="">新浪导航</a>
<a href="">新浪导航</a>
<a href="">新浪导航</a>
</div>
</body>
</html>