上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 37 下一页
摘要: 1、通过获取DOM方式直接获取子节点 其中price为父标签id的值,div为标签的名字。getElementsByTagName是一个方法。返回的是一个数组。在访问的时候按数组的形式访问即可,如var a = document.getElementById("price").getElements 阅读全文
posted @ 2022-07-25 10:05 SimoonJia 阅读(6730) 评论(0) 推荐(0)
摘要: this.activeIndex 循环模式下 会自动生成多个sild。操作不需要对它进行加减操作即可一一对应 index.html <!-- * @Author: 作者 * @Date: 2022-06-29 17:24:35 * @LastEditors: Simoon.jia * @LastEd 阅读全文
posted @ 2022-07-25 00:22 SimoonJia 阅读(113) 评论(0) 推荐(0)
摘要: function handlePX() { let swiperInstance = null; return function (status) { console.log(status); if (swiperInstance) { swiperInstance.update({ slidesP 阅读全文
posted @ 2022-07-25 00:17 SimoonJia 阅读(54) 评论(0) 推荐(0)
摘要: window.onresize = function () { width = document.body.clientWidth; console.log(width); if (width < 750) { swiperInstance.update({ slidesPerView: 1.253 阅读全文
posted @ 2022-07-24 23:58 SimoonJia 阅读(99) 评论(0) 推荐(0)
摘要: 1.正常做出自适应的slide 2.把slide文字内容与分页器放在同一个盒子里,分页器 绝对定位(设置bottom) ,文字内容正常设置为block(靠文字内容撑开父盒子,且分页器可以一直居于最下方,并且文字换行不会影响整体布局) 3.使用swiper内置方法 slideChangeTransit 阅读全文
posted @ 2022-07-24 23:39 SimoonJia 阅读(834) 评论(0) 推荐(0)
摘要: mySwiper.activeIndex 返回当前活动块(激活块)的索引。loop模式下注意该值会被加上复制的slide数。 slideChangeTransitionStart(swiper) slideChangeTransitionEnd(swiper) <script language="j 阅读全文
posted @ 2022-07-24 16:41 SimoonJia 阅读(346) 评论(0) 推荐(0)
摘要: //因为需要连续滚动,所以文本必须是两遍 <div class="wrap"> <div class="animate">我是文字</div> <div class="animate">我是文字</div> </div> //不能设置居中样式,会导致 出现空白缺口 .wrap{ display: f 阅读全文
posted @ 2022-07-22 11:23 SimoonJia 阅读(65) 评论(0) 推荐(0)
摘要: <div class="btn" onclick="showBig(this)"><.div> function showBig(jqItem) { //当前元素是他父元素的第几个。下标从0开始 console.log($(jqItem).index()); //当前元素的父元素是他爷爷元素的第几个 阅读全文
posted @ 2022-07-21 18:15 SimoonJia 阅读(224) 评论(0) 推荐(0)
摘要: //获取屏幕可视窗口的宽度 var W, H; function getCanSee() { W = $(window).width(); H = $(window).height(); console.log(W); console.log(H); } 阅读全文
posted @ 2022-07-21 18:10 SimoonJia 阅读(273) 评论(0) 推荐(0)
摘要: colorStops: [ { offset: 0, color: 'rgba(0, 222, 255,1)', // 0% 处的颜色 }, { offset: 0.01, color: 'rgba(0, 222, 255,1)', // 0% 处的颜色 }, { offset: 0.02, col 阅读全文
posted @ 2022-07-20 20:02 SimoonJia 阅读(1713) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 37 下一页