首页 > Web开发 > 详细

html+css实现简易下拉菜单

时间:2016-11-25 17:36:36      阅读:205      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
<style> 
div
{
   width:100px;
   height:40px;
   overflow:hidden;

   background:yellow;
   transition:height 0.5s;
   -moz-transition:height 0.5s; /* Firefox 4 */
   -webkit-transition:height 0.5s; /* Safari and Chrome */
   -webkit-transition-timing-function:ease-in-out; /* 慢->快->慢 */
   -o-transition:height 0.5s; /* Opera */
}

div:hover
{
  height:200px; /*变换后高度*/
}

div a
{ display:block; height:40px; width:100px; text-align:center; line-height:34px; background-color:#7d3; font-size:20px; } a:hover{ background-color:#397; } </style> </head>

<body> <div> <a href="#">link1</a> <a href="#">link2</a> <a href="#">link3</a> <a href="#">link4</a> <a href="#">link5</a> <a href="#">link6</a> </div> </body> </html>

 技术分享

 

html+css实现简易下拉菜单

原文:http://www.cnblogs.com/njust-ycc/p/6101958.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!