纯css实现带滚动条圆角导航菜单

2周前 (05-07 14:33)阅读10回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4714
  • 级别管理员
  • 主题942
  • 回复2
楼主

纯css实现圆角风格导航菜单,这个导航菜单鼠标经过时弹出下拉菜单并带滚动条显示,可根据自己的需求来修改即可。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>纯css实现带滚动条圆角导航菜单_武鸣人</title>
</head>
<style type="text/css">
.menu 
{font-family: verdana, arial, sans-serif; width:500px; padding:20px 0 100px 100px; position:relative;z-index:100;}
/* remove the bullets and set the margin and padding to zero for the unordered list */
.menu ul 
{padding:0; margin:0; list-style-type: none; border:0;}
/* float the list so that the items are in a line */
.menu ul li 
{float:left; position:relative; margin-right:1px;}
/* style the links to be 150px wide by 25px high. Set the background color and the font size. */
.menu ul li a, 
.menu ul li a:visited 
{display:block; text-align:left; text-decoration:none; width:150px; height:25px; color:#aaa; background:#fff url(/img/20240507_www_wuming_ren_1.gif); line-height:24px; font-size:11px; text-indent:10px;}
/* Get rid of any default table style */
table {border-collapse:collapse;margin:0; padding:0;}
/* make the dropdown ul invisible */
.menu ul li ul {display:none; text-align:left; position:absolute; top:25px; left:-20px; text-align:left;z-index:100; padding:0 30px 20px 20px; background:url(/img/20240507_www_wuming_ren_2.gif) 20px 100% no-repeat;}
/* set the foreground color of the main menu li on hover and the border to trigger IE */
.menu ul li:hover a, 
.menu ul li a:hover
{color:#fff; border:0;}
/* make the sub menu ul visible and position it beneath the first list item */
.menu ul li:hover ul, 
.menu ul li a:hover ul
{display:block;}
/* make the sub menu ul li the full width with padding and border. Add an auto scroll bar */
.menu ul li:hover ul li, 
.menu ul li a:hover ul li
{background:#363636; color:#000; width:149px; height:100px;overflow:auto; border-left:1px solid #7a7a7a;}
/* hack the widht for IE5.5 */
* html .menu ul li a:hover ul li {width:150px; w\idth:149px;}
/* style the background and foreground color of the submenu links */
.menu ul li:hover ul li a, 
.menu ul li a:hover ul li a
{float:left; display:block; background:#363636; color:#aaa; width:129px; text-align:left; text-decoration:none; border:0; text-indent:10px;}
/* style the background and forground colors of the links on hover */
.menu ul li:hover ul li a:hover,
.menu ul li a:hover ul li a:hover
{text-decoration:none; color:#fff; background:#222;}
</style>
<!--[if lt IE 7]>
<style type="text/css">
.menu ul li ul {display:block; visibility:hidden;}
.menu ul li a:hover ul {visibility:visible;}
</style>
<![endif]-->
<!--[if IE]>
<style type="text/css">
.menu ul li:hover ul li,
.menu ul li a:hover ul li
{
scrollbar-arrow-color: #aaa;
scrollbar-3dlight-color: #888;
scrollbar-highlight-color: #666;
scrollbar-face-color: #444;
scrollbar-shadow-color: #000;
scrollbar-darkshadow-color: #888;
scrollbar-track-color: #363636;
}
</style>
<![endif]-->
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div class="menu">
<ul>
<li><a class="hide" href="https://www.wuming.ren">武鸣人一号菜单<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li>
<a href="https://www.wuming.ren">武鸣人一号</a>
<a href="https://www.wuming.ren">武鸣人二号</a>
<a href="https://www.wuming.ren">武鸣人三号</a>
<a href="https://www.wuming.ren">武鸣人四号</a>
<a href="https://www.wuming.ren">武鸣人五号</a>
<a href="https://www.wuming.ren">武鸣人六号</a>
<a href="https://www.wuming.ren">武鸣人七号</a>
<a href="https://www.wuming.ren">武鸣人八号</a>
<a href="https://www.wuming.ren">武鸣人九号</a>
<a href="https://www.wuming.ren">武鸣人十号</a>
<a href="https://www.wuming.ren">武鸣人十一号</a>
<a href="https://www.wuming.ren">武鸣人十二号</a>
<a href="https://www.wuming.ren">武鸣人十三号</a>
<a href="https://www.wuming.ren">武鸣人十四号</a>
<a href="https://www.wuming.ren">武鸣人十五号</a>
<a href="https://www.wuming.ren">武鸣人十六号</a>
<a href="https://www.wuming.ren">武鸣人十七号</a>
<a href="https://www.wuming.ren">武鸣人十八号</a>
<a href="https://www.wuming.ren">武鸣人十九号</a>
<a href="https://www.wuming.ren">武鸣人二十号</a>
<a href="https://www.wuming.ren">武鸣人二十一号</a>
<a href="https://www.wuming.ren">武鸣人二十二号</a>
<a href="https://www.wuming.ren">武鸣人二十三号</a>
<a href="https://www.wuming.ren">武鸣人二十四号</a>
<a href="https://www.wuming.ren">武鸣人二十五号</a>
<a href="https://www.wuming.ren">武鸣人二十六号</a>
<a href="https://www.wuming.ren">武鸣人二十七号</a>
<a href="https://www.wuming.ren">武鸣人二十八号</a>
<a href="https://www.wuming.ren">武鸣人二十九号</a>
<a href="https://www.wuming.ren">武鸣人三十号</a>
</li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li><a class="hide" href="https://www.wuming.ren">武鸣人二号菜单<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<ul>
<li>
<a href="https://www.wuming.ren">武鸣人一号</a>
<a href="https://www.wuming.ren">武鸣人二号</a>
<a href="https://www.wuming.ren">武鸣人三号</a>
<a href="https://www.wuming.ren">武鸣人四号</a>
<a href="https://www.wuming.ren">武鸣人五号</a>
<a href="https://www.wuming.ren">武鸣人六号</a>
<a href="https://www.wuming.ren">武鸣人七号</a>
<a href="https://www.wuming.ren">武鸣人八号</a>
<a href="https://www.wuming.ren">武鸣人九号</a>
<a href="https://www.wuming.ren">武鸣人十号</a>
<a href="https://www.wuming.ren">武鸣人十一号</a>
<a href="https://www.wuming.ren">武鸣人十二号</a>
<a href="https://www.wuming.ren">武鸣人十三号</a>
<a href="https://www.wuming.ren">武鸣人十四号</a>
<a href="https://www.wuming.ren">武鸣人十五号</a>
<a href="https://www.wuming.ren">武鸣人十六号</a>
<a href="https://www.wuming.ren">武鸣人十七号</a>
<a href="https://www.wuming.ren">武鸣人十八号</a>
<a href="https://www.wuming.ren">武鸣人十九号</a>
<a href="https://www.wuming.ren">武鸣人二十号</a>
<a href="https://www.wuming.ren">武鸣人二十一号</a>
<a href="https://www.wuming.ren">武鸣人二十二号</a>
<a href="https://www.wuming.ren">武鸣人二十三号</a>
<a href="https://www.wuming.ren">武鸣人二十四号</a>
<a href="https://www.wuming.ren">武鸣人二十五号</a>
<a href="https://www.wuming.ren">武鸣人二十六号</a>
<a href="https://www.wuming.ren">武鸣人二十七号</a>
<a href="https://www.wuming.ren">武鸣人二十八号</a>
<a href="https://www.wuming.ren">武鸣人二十九号</a>
<a href="https://www.wuming.ren">武鸣人三十号</a>
</li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
</div>
</body>
</html>


0
0
收藏0
回帖

纯css实现带滚动条圆角导航菜单 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息