前端 - 组件

版权声明: https://blog.csdn.net/Dream_Weave/article/details/82917602
  1. 轮播图

    Ps:在 JS 中,function 这里的 d 是最终值 d==len,而不是一 一绑定。
  2. 二级菜单

    a、menuItems [m]. setAttribute("data-index",m); 不能写在 menuItems[m].onmouseover=function(){} 里面。
    b、因为“data-index”是自定义属性,所以不能用 menuItems [m]. data-index = m; 需要用 menuItems [m]. setAttribute("data-index",m); 来替代。
    c、同理 b,也不能用 this.data-index 来获取值,需要使用 this.getAttribute("data-index")。

    a、方案一:用 HTML + CSS 搭建“透明桥块”s.t.鼠标划过去。
    b、方案二:如图,采用JS。
  3. JavaScript实现轮播特效 + 二级菜单效果(代码)下载链接
  4. 待更新...

猜你喜欢

转载自blog.csdn.net/Dream_Weave/article/details/82917602
今日推荐