js实现三维翻转弹出层弹出确认框效果代码
代码语言:html
所属分类:弹出层
代码描述:js实现三维翻转弹出层弹出确认框效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> @import url(https://fonts.googleapis.com/css?family=Roboto:400,700); html, body { width: 100%; height: 100%; margin: 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } body { display: -webkit-flex; display: -ms-flexbox; display: flex; font-family: Roboto,"Helvetica Neue", sans-serif; font-size: 18px; -webkit-perspective: 1000px; perspective: 1000px; background-color: #f5f5f5; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; } .description { margin-top: 50px; text-align: center; color: #999; transition: opacity 0.3s ease; } .description a { color: #4A9DF6; text-decoration: none; } .btn.is-open ~ .description { opacity: 0; } .btn { display: block; position: relative; width: 200px; height: 80px; transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1), height 0.8s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); transition: width 0.8s cubic-bezier(0.23, 1, 0.32, 1), height 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; text-align: center; } .btn-front { position: absolute; display: block; width: 100%; height: 100%; line-height: 80px; background-color: #F44336; color: #fff; cursor: pointer; -webkit-backface-visibility: hidden; backface-visibility: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: background 0.15s ease, line-height 0.8s cubic-bezier(0.23, 1, 0.32, 1); } .btn-front:hover { background-color: #f77066; } .btn.is-open .btn-front { pointer-events: none; line-height: 160px; } .btn-back { position: ab.........完整代码请登录后点击上方下载按钮下载查看
网友评论0