div导航栏设置

原创 2019-05-28 11:26:24 380
摘要:<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title>导航小菜单</title> <link rel="shortcut icon" type="image/x-icon"href=&qu

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>导航小菜单</title>

<link rel="shortcut icon" type="image/x-icon"href="images/favicon.ico">

<style tapy="text/css">


.box1{width:80px;height:20px;background:#ccc;line-height:20px;text-align:center;}

.main{width:80px;height:20px;background:blue;line-height:20px;text-align:center;display:none;}

.box1:hover .main{display:block}

div{width:80px;height:20px;background:#ccc;margin:0px 40px ;float:left}

</style>

</head>

<body>


<div class=box1> 导航1

<div class=main> 菜单</div>

</div>

<div class=box2> 导航2</div>

<div class=box3> 导航3</div>


</body>

</html>


批改老师:天蓬老师批改时间:2019-05-28 16:00:12
老师总结:<div class=box2> 导航2</div> <div class=box3> 导航3</div> 以后记住 , div中不要直接放文字

发布手记

热门词条