body {background-color: #c3c3c3}
摘要: offset 是到网页最左上角 0.0 的边距 获取方法: $(".a1").offset() 获取的是对象 $(".a3").offset().top 获取 top值 Number $(".a3").offset().left $(".a4")[0].offsetWidth 获取元素的宽度 阅读全文
posted @ 2018-11-16 16:00 最美胡萝卜 阅读(102) 评论(0) 推荐(0)
摘要: 一.点击 右边滚动条跳转,模仿汽车品牌查找滚动条主要知识点: 1.$(this).text() 查找当前的文本内容,用东西存起来 2.右边的scrollTop() 里面填写 根据左边text值在右边查找到对应的dom元素 然后再读取顶部的距离 二 选项卡切换 1.$(this).index() 这个 阅读全文
posted @ 2018-11-16 11:11 最美胡萝卜 阅读(146) 评论(0) 推荐(0)
body {background-color: #c3c3c3}