页面过渡动画效果
代码语言:html
所属分类:加载滚动
代码描述:页面过渡动画效果
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@900&display=swap"); .animation-wipe { width: 100%; height: 100vh; position: fixed; top: -100vh; right: 0; z-index: 100; } .animation-wipe .box-1, .animation-wipe .box-2 { display: block; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 1; } .animation-wipe .box-1:before, .animation-wipe .box-2:before { content: ''; display: block; width: 100%; height: 0; position: absolute; top: 0; left: 0; background: white; -webkit-transition: height 0.5s 0.1s ease-out; transition: height 0.5s 0.1s ease-out; } .animation-wipe .box-1:after, .animation-wipe .box-2:after { content: ''; display: block; width: 0; height: 100%; position: absolute; top: 0; right: 0; background: white; -webkit-transition: width 0.5s 0.1s ease-out; transition: width 0.5s 0.1s ease-out; } .animation-wipe .box-2 { z-index: 2; } .animation-wipe .box-2:before { top: auto; bottom: 0; } .animation-wipe .box-2:after { right: auto; left: 0; } .animation-wipe .loader { display: block; width: 100px; height: 100px; position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%) rotate(-27deg); transform: translate(-50%, -50%) rotate(-27deg); z-index: 5; opacity: 0; -webkit-transition: opacity 0.1s ease-out; transition: opacity 0.1s ease-out; } .animation-wipe .loader svg { display: block; width: 100%; } .animation-wipe.top { top: 0; } .animation-wipe.show .box-1:before, .animation-wipe.show .box-2:before { height: 100%; -webkit-transition: height 0.5s ease-in; transition: height 0.5s ease-in; } .animation-wipe.show .box-1:after, .animation-wipe.show .box-2:after { width: 100%; -webkit-transition: width 0.5s ease-in; transition: width 0.5s ease-in; } .animation-wipe.show .loader { opacity: 1; -webkit-transition: opacity 0.1s 0.5s ease-in; transition: opacity 0.1s 0.5s ease-in; } body { background: #2b2a26; } .display-content { display: -webkit-box; display: flex; width: 100%; height: 100vh; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center; -webkit-transition: -webkit-transform .5s ease-out; transition: -webkit-transform .5s eas.........完整代码请登录后点击上方下载按钮下载查看
网友评论0