swiper实现全屏垂直滚动幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述: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.4.5.1.css"> <style> :root { --dark-green: #9cc675; --dark-yellow: #e89a3d; --extra-light-brown:#fdf0d7; --light-brown: #ecd5ab; --dark-brown:#915b40; --light-yellow:#f8e3a8; --light-red:#f3ac99; --light-teal:#a6c8cc; --light-gray:#ddd5d6; --default-color: #a6c8cc; --secondry-color: #e89a3d; } html, body { position: relative; height: 100%; font-family: sans-serif; } body { background: #eee; font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 14px; color:#000; margin: 0; padding: 0; } .swiper-container { width: 100%; height: 100%; } .swiper-slide { font-size: 18px; color:#fff; -webkit-box-sizing: border-box; box-sizing: border-box; padding: 40px 60px; } .parallax-bg { position: absolute; left: 0; top: 0; width: 130%; height: 100%; -webkit-background-size: cover; background-size: cover; background-position: center; } .swiper-slide .subtitle { padding-left: 60px; } .colored-container { width: 100%; height: 100%; position: relative; background: #fff; } .halfbox { content: ''; position: absolute; top: 0; left: 0; background: var(--default-color); width: 50%; height: 100%; padding: 50px 50px; box-sizing: border-box; } .slidebox { position: relative; width: 450px; } .bordered-img { width: 350px; position: relative; } .bordered-img img{ width: 100%; height: 100%; padding: 2px; } .bordered-img:before, .bordered-img:after { content: ''; border: 8px solid #fff; width: 100%; height: 96%; position: absolute; display: block; } .bordered-img:after { border-color: var(--secondry-color); top: 0; /* left: 2px; */ width: 29%; right: -10px; border-left-width: 0; } .title { font-size: 50px; text-transform: uppercase; position: relative; letter-spacing: 3px; font-weight: bold; margin-left: 18px; color: var(--secondry-color); } .title >span { color: var(--default-color); margin-right: 15px; } .tag-box { --s.........完整代码请登录后点击上方下载按钮下载查看
网友评论0