jquery二级导航css样式如何编写,jquery二级菜单导航
内容导航:
一、用CSS样式制作的网页二级导航!
- 我的首页
我的CHINAY
我的首页
我的日志
我的日志
我的相册
我的收藏
- 社区圈子
我的CHINAY
我的首页
我的日志
我的相册
我的收藏
- 我的短信
我的CHINAY
我的相册
我的收藏
- 账户管理
我的CHINAY
我的首页
我的日志
我的相册
我的收藏
我的日志
我的相册
我的收藏
采纳哦
二、我得jquery和css样式是这样写的二级导航怎么才能改正确了 搜狗
三级导航
这是三级
-
点我
-
A
- B
- C
- D
.leftmenu{width:187px;paping-bottom: 9999px;margin-bottom: -9999px;
overflow:hipen;background:#e5e5e5; / Old browsers / border-radius:4px;
border-bottom:1px solid #d0cfcc; background: -moz-linear-gradient(top, #fcfcfc
0%, #e5e5e5 100%); / FF3.6+ / background: -webkit-gradient(linear, left top,
left bottom, color-stop(0%,#fcfcfc), color-stop(100%,#e5e5e5)); /
Chrome,Safari4+ / background: -webkit-linear-gradient(top, #fcfcfc 0%,#e5e5e5
100%); / Chrome10+,Safari5.1+ / background: -o-linear-gradient(top, #fcfcfc
0%,#e5e5e5 100%); / Opera 11.10+ / background: -ms-linear-gradient(top,
fcfcfc 0%,#e5e5e5 100%); / IE10+ / background: linear-gradient(top, #fcfcfc
0%,#e5e5e5 100%); / W3C / }.leftmenu p{background: url(../images/)
repeat-x;line-height:35px;line-height:35px;font-weight:bold;font-
size:14px;border-right:solid 1px #b7d5df;}.leftmenu p
span{float:right;margin:5px 8px 0 12px; line-height:30px; font-
size:18px;}/.leftmenu p .menuson{display:none;}/.title{ text-
align:center;}.leftmenu p:first-child .menuson{display:block;}.menuson {line-
height:30px; font-weight:normal; }.menuson li{cursor:pointer;}.menuson
{position:relative;background:url(../images/) repeat-x; line-height:30px;
color:#fff;}.menuson li cite{display:block; float:left; margin-left:32px;
width:16px; height:20px; margin-top:7px;}.menuson
cite{/background:url(../images/) no-repeat;/}.menuson i{display:block;
width:6px; height:11px; position:absolute; right:0;z-; top:9px;
right:-1px;}.menuson li a{ display:block; display:inline; paping-top:5px;
color:#333;}.menuson a{color:#fff;
background:#0abbbb;}.title{cursor:pointer;}#left{
overflow:hipen;width:150px;border:1px solid #ccc;}.fenzu{font-size:14px;line-
height:30px;margin-left:20px;/margin-top:10px;/margin-bottom:10px;text-
indent:10px;margin-right:5px;color:#666;}#lm{background:#666;border-bottom:1px
solid #CCC;}然而 你并没有 说出 你出现的问题问题不是很清晰呀
三、怎样用div标签和css样式一起编写导航条的代码
答:去找个源码改下就好了。现在很多这样现成的
四、css二级菜单样式如何设置
代码粘贴的太复杂;先给你分析一下原理:二级菜单没有在没有hover属性的情况下是隐藏的所以需要display:none,当鼠标hover的时候二级菜单才会列出来,这是纯css可以实现的;知道上面的原理之后,下面比较容易实现具体看例子:HTML代码:
- 一级菜单
- 一级菜单二级菜单
CSS代码:ul li -ul{ display: none;position:relative }/正常情况下隐藏/ul li:hover -ul
li{display: block;} /当鼠标放上去二级菜单li
显示出来//这个时候你会发现二级菜单显示的位置可能不对可以使用position属性/ul li:hover -ul
li{position:absolute;}/通过top right left
调整位置,根据实际情况调整背景颜色,字体颜色等,细节东西/此时可能会发现会二级菜单出现有那么一点点的生硬;没关系配合jquery实现缓慢展现效果$(document).ready(function()
{if($(window).width() > 768) {$(‘ul li’).hover(function() {$(‘ul’,
this).stop().slideDown(200); },function() { $(‘ul’, this).stop().slideUp(200);
});}});注意不知道jquery的新手使用记住先加载文件,放在此段js前面;
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请发送邮件至 55@qq.com 举报,一经查实,本站将立刻删除。转转请注明出处:https://www.szhjjp.com/n/112575.html