关注前端开发
关注用户体验

导航效果

html

<div <ul>

<li><a href=”#” name=”topurl”>首页</a></li>

<li><a href=”#” name=”topurl”>手机</a></li>

<li><a href=”#” name=”topurl”>女人</a></li>

<li><a href=”#” name=”topurl”>数码家电</a></li>

<li><a href=”#” name=”topurl”>居家</a></li>

<li><a href=”#” name=”topurl”>读书</a></li>

</ul>

<script language=”javascript”>

function showmenu(){

var url = document.URL;

var urls = document.getElementsByName(“topurl”);

for(var i=0;i<urls.length;i++){

if(urls[i] == url){

urls[i].parentNode.className = ‘navselect’;

return;

}

}

urls[0].parentNode.className = ‘navselect’;

}

showmenu();

</script>

</div>

css

.navdefault{float:left;text-align:center;color:#fff;letter-spacing:1px;font-size:12px;}

.navselect {float:left;text-align:center;font-weight:bolder;color:#FFF;background:url(../images/head01/head_17.gif) no-repeat bottom;font-size:14px;}

赞(0)
未经允许不得转载:大前端 » 导航效果
分享到: 更多 (0)

评论 9

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #8

    a little something written here was absolutely Lots of great . an incredible I just want

    Lawerence Persia2周前 (05-15)回复
  2. #7

    I’m curious to find out what blog system you’re utilizing? I’m experiencing some small security problems with my latest site and I would like to find something more safeguarded. Do you have any solutions?

    Nonton Anime2周前 (05-10)回复
  3. #6

    I am really glad I’ve found this info. Today bloggers publish only about gossips and web and this is actually annoying. A good website with interesting content, that’s what I need. Thanks for keeping this web site, I’ll be visiting it. Do you do newsletters? Cant find it.

    cat care3周前 (05-08)回复
  4. #5

    I am glad that I have observed this blog. Ultimately anything not a crap, which we understand quite usually. The web site is lovingly maintained and up to date. So it really should be, thank you for this welcome transform.

    Diego Hodgkinson2个月前 (04-08)回复
  5. #4

    I need to to thank you for this good read!! I absolutely loved every little bit of it. I have you saved as a favorite to check out new things you post…

    DMC52个月前 (03-31)回复
  6. #3

    Best work you have done, this online website is really cool with great facts.

    my singing monsters2个月前 (03-28)回复
  7. #2

    when using hair dryers, it would be better to use those low wattage types because they are not very damaging to the hair-

    Tobias Kalinger3个月前 (03-11)回复
  8. #1

    在IE下不正常也。显示是这样:

    首页·手机
    ·女人
    ·数码家电
    ·居家
    ·读书

    stone8年前 (2011-07-15)回复

themebetter 国内更好的WordPress主题服务商

立即前往