swiper实现背景冒彩色泡泡的可拖动图文幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:swiper实现背景冒彩色泡泡的可拖动图文幻灯片效果代码
代码标签: swiper 背景 冒 彩色 泡泡 拖动 图文 幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper-bundle.10.3.1.css"> <style> @import url("https://fonts.googleapis.com/css2?family=Raleway:wght@200;300;400;500;600&display=swap"); *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; font-family: "Raleway", sans-serif; } body { position: relative; display: flex; justify-content: center; align-items: center; background: #23232a; min-height: 100vh; width: 100%; overflow: hidden; } main { display: grid; grid-template-columns: 1fr; width: 100%; place-items: center; min-height: 100vh; padding: 0 100px; } /* SWIPER */ .swiper { max-width: 750px; aspect-ratio: 5/3; z-index: 10; } .swiper-pagination { transform: translateY(-10px); z-index: 10; --swiper-pagination-color: #7edd90; --swiper-pagination-bullet-size: 12px; --swiper-pagination-bullet-horizontal-gap: 5px; } .swiper-slide { display: grid; grid-template-columns: 40% 60%; place-items: center; gap: 15px; padding: 20px 40px 20px 20px; border-radius: 50px; border: 2px solid rgba(255, 255, 255, 0.1); background: #23232a; box-shadow: inset 18px 18px 8px rgba(0, 0, 0, 0.2), inset -10px -18px 8px rgba(255, 255, 255, 0.1); } .swiper-slide > img { width: 80%; height: 80%; border-radius: 30px; border: 2px solid #fff; filter: grayscale(40%); } .content { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 25px; color: #fff; } .title > h1 { display: flex; align-items: center; gap: 8px; line-height: 1.4; letter-spacing: 0.2rem; font-size: 1.3rem; } .title > h3 { line-height: 1.5; letter-spacing: 0.05rem; color: #6b7280; font-size: 1.1rem; } .........完整代码请登录后点击上方下载按钮下载查看
网友评论0