css制作简易导航栏,但是不知道为什么不成功

Original 2019-04-26 09:14:12 177
abstract:<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>导航栏</title>    <style>   &nbs

<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title>导航栏</title>
   <style>
       .nav{
           background-color: #00aba9;width: 100px;height: 40px;text-align: center;line-height: 40px;
       }
       .main{
           width: 100px; height: 100px; background-color: pink;text-align: center;line-height: 100px;display: none;
       }
       .nav:hover .main{display: block;}
   </style>
</head>
<body>
<div class="nav">导航</div>
<div class="main">小菜单</div>
</body>
</html>

Correcting teacher:查无此人Correction time:2019-04-26 13:33:25
Teacher's summary:完成的不错。可以把常用的css样式写到单独的文件里,随时可以使用。继续加油。

Release Notes

Popular Entries