菜单推入推出效果
代码语言:html
所属分类:菜单导航
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" class="no-js"> <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> html,body,.container,.content-wrap { overflow: hidden; width: 100%; height: 100% padding: 0; margin: 0;; } .container { background: #373a47 } .menu-wrap a { color: #b8b7ad } .menu-wrap a:hover,.menu-wrap a:focus { color: #c94e50 } .content-wrap { overflow-y: scroll; -webkit-overflow-scrolling: touch; -webkit-transition: -webkit-transform .3s; transition: transform .3s } .content { position: relative; background: #b4bad2 } .content::before { position: absolute; top: 0; left: 0; z-index: 10; width: 100%; height: 100%; background: rgba(0,0,0,.3); content: ''; opacity: 0; -webkit-transition: opacity .3s,-webkit-transform 0s .3s; transition: opacity .3s,transform 0s .3s; -webkit-transform: translate3d(100%,0,0); transform: translate3d(100%,0,0) } .menu-button { position: fixed; z-index: 1000; margin: 1em; padding: 0; width: 2.5em; height: 2.25em; border: none; text-indent: 2.5em; font-size: 1.5em; color: transparent; background: 0 0 } .menu-button::before { position: absolute; top: .5em; right: .5em; bottom: .5em; left: .5em; background: linear-gradient(#373a47 20%,transparent 20%,transparent 40%,#373a47 40%,#373a47 60%,transparent 60%,transparent 80%,#373a47 80%); content: '' } .menu-button:hover { opacity: .6 } .close-button { width: 16px; height: 16px; position: absolute; right: 1em; top: 1em; overflow: hidden; text-indent: 16px; border: none; z-index: 1001; background: 0 0; color: transparent } .close-button::before,.close-button::after { content: ''; position: absolute; width: 2px; height: 100%; top: 0; left: 50%; background: #95a5a6 } .close-button::before { -webkit-transform: rotate(45deg); transform: rotate(45deg) } .close-button::after { -webkit-transform: rotate(-45deg); transform: rotate(-45deg) } .menu-wrap { position: absolute; z-index: 1001; width: 300px; height: 100%; font-size: 1.15em; -webkit-transform: translate3d(-300px,0,0); transform: translate3d(-300px,0,0); -webkit-transition: -webkit-transform .3s; transition: transform .3s } .menu { background: #373a47; width: calc(100% - 120px); height: 100%; padding: 2em 1em } .icon-list { width: 280px } .icon-list a { display: blo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0