为什么时引入css时没有样式

来源:2-1 html5页面布局(表现层_header)

小明明

2017-08-06 20:34:18

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Document</title>

<!-- <link rel="stylesheet" type="text/css" href="wybj.css"> -->

<style type="text/css">

*{

font-family: Arial;

font-size: 14px;

margin: 0;

padding: 0;

border: none;

}

a{

text-decoration: none;

}

ul{

list-style: none;

}

/*header*/

header{

height: 80px;

background: #000;

}

header > .container{

width: 1200px;

margin: 0 auto;

}

header > .contaider > a{

display: block;

float: left;

margin:5px 25px; 

}

header > .contaider > nav{

float: right;

}

header > .contaider > nav > a{

font-size: 24px;

display: block;

height: 73px;

width: 110px;

line-height: 73px;

text-align: center;

float: left;

color: white;

}

header > .container > nav >a.Home{background: blue;}

header > .container > nav >a.Course{background: lightblue;}

header > .container > nav >a.Actual{background: yellow;}

header > .container > nav >a.Plan{background: pink;}

header > .container > nav >a.FAQ{background: orange;}

header > .container > nav >a.Notes{background: red;}

</style>

</head>

<body>

<header>

<div class="container">

<a href="index.html"><img src="img/logo.png"></a>

<a href="">MYMOOC</a>

<nav>

<a class="active" href="index.html">Home</a>

<a href="#">Course</a>

<a href="#">Actual</a>

<a href="#">Plan</a>

<a href="#">FAQ</a>

<a href="#">Notes</a>

</nav>

</div>

</header>


</body>

</html>


写回答

1回答

樱桃小胖子

2017-08-07

建议检查一下css文件的链接地址是否正确哦

0

0 学习 · 5760 问题

查看课程