自适应时间线大事记幻灯片动画效果
代码语言:html
所属分类:幻灯片
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CodePen - Responsive slider timeline with Swiper</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/swiper.min.css" /> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,700,800'> <style> html, body, .container { height: 100%; } body { font-family: 'Open Sans', sans-serif; font-size: 14px; } .container { display: flex; justify-content: center; align-items: center; background-color: #fff; flex-direction: column; } .title { font-size: 38px; color: #616161; font-style: italic; font-weight: 800; } .timeline { width: 100%; background-color: #fff; box-shadow: 0 5px 25px 5px rgba(0, 0, 0, 0.2); } .timeline .swiper-container { height: 600px; width: 100%; position: relative; } .timeline .swiper-wrapper { transition: 2s cubic-bezier(0.68, -0.4, 0.27, 1.34) 0.2s; } .timeline .swiper-slide { position: relative; color: #fff; overflow: hidden; background-size: cover; background-repeat: no-repeat; background-position: center center; } .timeline .swiper-slide::after { content: ""; position: absolute; z-index: 1; right: -115%; bottom: -10%; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); box-shadow: -230px 0 150px 60vw rgba(0, 0, 0, 0.7); border-radius: 100%; } .timeline .swiper-slide-content { position: absolute; text-align: center; width: 80%; max-width: 310px; right: 50%; top: 13%; -webkit-transform: translate(50%, 0); transform: translate(50%, 0); font-size: 12px; z-index: 2; } .timeline .swiper-slide .timeline-year { display: block; font-style: italic; font-size: 42px; margin-bottom: 50px; -webkit-transform: t.........完整代码请登录后点击上方下载按钮下载查看
网友评论0