
BLAVOR Solar Power Bank PN-W26(20,000mAh, 10W, Wireless Charger, Radio)
samueldiv { background: #f4f4f4; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; color: #333; margin: 0; padding: 0; } .swiper { width: 100%; height: auto; margin: 10px auto; } .swiper-slide { text-align: center; font-size: 18px; background: #fff; display: flex; justify-content: center; align-items: center; } .append-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; } .append-buttons a { flex: 1 1 120px; max-width: 160px; height: 40px; display: flex; justify-content: center; align-items: center; text-align: center; border: 2px solid #ff6500; border-radius: 5px; color: #ff6500; font-size: 16px; } .append-buttons a:hover { background-color: #ff6500; color: #fff; } .append-buttons a.active { background-color: #ff6500; color: #fff; } /**************video********************/ .product-Description-samuel-video{ position: relative; width: 100%; margin: 0px 0 10px 0; } .product-Description-samuel-video video { display: block; width: 100%; cursor: pointer; } /**************************************/ /**************双图********************/ .image-grid-two-description { display: grid; grid-template-columns: repeat(2, 1fr); /* 电脑端每行2个图片 */ gap: 10px; /* 图片间距 */ max-width: 100%; margin: 0px 0 10px 0; } /* 响应式布局,手机端自适应 */ @media screen and (max-width: 600px) { .image-grid-two-description { grid-template-columns: 1fr; /* 手机端一行一个图片 */ gap: 5px; /* 图片间距 */ } } /* 图片容器样式 */ .image-container-two-description { position: relative; } /* 图片样式 */ .image-container-two-description img { width: 100%; display: block; } /* 文本样式 */ .image-container-two-description p { text-align: center; color: #000000; /* 字体颜色:黑色 */ font-size: 18px; /* 字体大小 */ font-weight: bold; /* 加粗 */ margin: 8px 0 0px 0; /* 控制文本与图片的间距 */ } /**************************************/ /**************单长图********************/ /* 图片容器的基本布局 */ .single-image-container-description { max-width: 100%; /* 最大宽度,调整以适应你的需求 */ margin: auto; /* 居中对齐 */ margin: 0px 0 10px 0; } /* 响应式布局 */ @media screen and (max-width: 600px) { .single-image-container-description img { height: 180px; /* 手机端图片固定高度 */ object-fit: cover; /* 图片覆盖,保持比例 */ } } /* 图片样式 */ .single-image-container-description img { width: 100%; display: block; height:100%; } /**************************************/ 5 Devices at Once Built-in Cables Fast Charging Wireless Charger 2 Charging Methods IPX5 Flash Lights Package Including // Swiper 1 const swiper1 = new Swiper('.swiper-1', { slidesPerView: 1, centeredSlides: true, spaceBetween: 0, mousewheel: false // Disable mousewheel scroll }); // Swiper 2 const swiper2 = new Swiper('.swiper-2', { slidesPerView: 1, centeredSlides: true, spaceBetween: 0, mousewheel: false // Disable mousewheel scroll }); const buttons1 = document.querySelectorAll('.buttons-1 a'); const buttons2 = document.querySelectorAll('.buttons-2 a'); function setActiveButton(buttons, clickedButton) { buttons.forEach(button => button.classList.remove('active')); clickedButton.classList.add('active'); } // Event listeners for Swiper 1 buttons1.forEach((button, index) => { button.addEventListener('click', function (e) { e.preventDefault(); swiper1.slideTo(index, 0); setActiveButton(buttons1, this); }); }); // Event listeners for Swiper 2 buttons2.forEach((button, index) => { button.addEventListener('click', function (e) { e.preventDefault(); swiper2.slideTo(index, 0); setActiveButton(buttons2, this); }); }); // Update active button when Swiper 1 slide changes swiper1.on('slideChange', function () { const activeIndex = swiper1.activeIndex; setActiveButton(buttons1, buttons1[activeIndex]); }); // Update active button when Swiper 2 slide changes swiper2.on('slideChange', function () { const activeIndex = swiper2.activeIndex; setActiveButton(buttons2, buttons2[activeIndex]); }); // Function to update images for mainimg function mainimg() { const imgSrcs = [ "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/1_33674a43-5f1d-436f-b2e9-de16a31bd4f5.jpg"//首图移动 ]; imgSrcs.forEach((src, index) => { document.getElementById(`firstimg`).src = src; }); } // Function to update images for Swiper 1 //Swiper 1 function updateImages01() { const imgSrcs = [ "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/2_0176faa0-82d5-4c41-bf0e-2ca2968cc6e0.jpg",//swImg01 "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/3_6c4bb3db-e4c4-4905-ba15-88bf1e0271b4.jpg",//swImg02 "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/4_73b63180-4c1a-4012-b651-526264eadb49.jpg",//swImg03 "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/5_37905aec-ab71-4650-b25b-a297f37c04db.jpg"//swImg04 ]; imgSrcs.forEach((src, index) => { document.getElementById(`img-slide-01-${index}`).src = src; }); } // Function to update images for Swiper 2 function updateImages02() { const imgSrcs = [ "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/6_e6e9e4ea-77f6-46eb-a9d4-b74ad9cef08d.jpg", "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/7_85c257d3-4fb3-4cd7-9e2c-846fb25195b8.jpg", "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/9_cf264323-d5e1-417b-8635-f03006c32024.jpg", "https://cdn.shopify.com/s/files/1/0515/3937/8330/files/11_e6ac09ec-18ef-4894-be78-5b273abe8af9.jpg" ]; imgSrcs.forEach((src, index) => { document.getElementById(`img-slide-02-${index}`).src = src; }); } // Update images for mobile view if (window.innerWidth