• 手机版

    扫码体验手机版

  • 微信公众号

    扫码关注公众号

国内首家协议开发

软芯音视解码保护平台

在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

网页定位导航特效原生js没有效果

网页定位导航特效手写原生js版                                                        *{                        margin: 0;                        padding: 0;                }                body{                        font-size: 12px;                        line-height: 1.7;                }                li{                        list-style: none;                }                #content{                        width: 800px;                        margin:0 auto;                        padding:20px;                }                #content h1{                        color:#0088bb;                }                #content .item{                        padding:20px;                        margin-bottom:20px;                        border:1px dotted #0088bb;                }                #content .item h2{                        font-size: 16px;                        font-weight: bold;                        border-bottom: 2px solid #0088bb;                        margin-bottom: 10px;                }                #content .item li{                        display: inline;                        margin-right:10px;                }                #content .item li a img{                        width: 230px;                        height: 230px;                        border: none;                }                #menu{                        position: fixed;                        top:100px;                        left: 50%;                        margin-left: 400px;                        width: 80px;                }                #menu ul li a{                        display: block;                        margin:5px 0;                        font-size: 14px;                        font-weight:bold;                        color:#333;                        width: 80px;                        height: 50px;                        line-height: 50px;                        text-align: center;                        text-decoration: none;                }                #menu ul li a:hover,                #menu ul li a.current{                        color: #fff;                        background-color: #0088bb;                }                /*hack ie6不支持position:fixed*/                *html,*html body{                        background-image:url(about:blank);                        background-attachment: fixed;                }                *html #menu{                        /*position: fixed;*/                        position: absolute;                        top: expression(((e=document.documentElement.scrollTop)?e:document.body.scrollTop)+100+'px');                }                       

        地狗购物网

                        1F 男装

               
                           
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                
       
                        2F 女装

               
                           
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                
       
                        3F 美妆

               
                           
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                
       
                        4F 数码

               
                           
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                
       
                        5F 母婴

               
                           
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                        
  •                

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与2

你是想实现导航栏随着你点击或者滚动鼠标时的动态样式是吧,你的代码写得很好 但是有一个地方出问题了 就是getByClassName()方法里的returnresult; 他不能放在for循环里面 当你第一次进去就返回结果并且不执行后面的循环了 所以你得把returnresult;这段代码拿出for循环

使用道具 举报

css样式表为什么写两个?

使用道具 举报

发新帖

发布任务需求已有1031164位用户正在使用天盟网服务

发布分类: *
任务预算: *
需求内容: *
手机号码: *
任务商家报价为
  • 预算价 :
  • 成交价 :
  • 完工期 :
  • 质保期 :

* 最终任务项目以服务商报价、双方协商为准!