纯css实现的粘性全屏分块滑动切换效果
代码语言:html
所属分类:视觉差异
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Lora:400,400i,700"); body { margin: 0; padding: 0; } .container { height: 100vh; font-family: Lora,serif; overflow-x: hidden; } .slide { position: -webkit-sticky; position: sticky; top: 0; height: 100vh; display: flex; justify-content: center; align-items: center; letter-spacing: 0.2em; color: white; background-size: cover; background-position: center; } .slide h1 { font-size: 250%; text-shadow: 0 2px 2px black; } #slide1 { background-image: url("http://repo.bfw.wiki/bfwrepo/image/5d653d54ed035.png"); } #slide2 { background-image: url("http://repo.bfw.wiki.........完整代码请登录后点击上方下载按钮下载查看
网友评论0