css实现全屏缩放三维立体菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:css实现全屏缩放三维立体菜单效果代码,点击右上角九宫格菜单显示立体菜单。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,700,900" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Roboto', sans-serif; color: #323232; position: relative; perspective: 2000px; /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#45484d+0,000000+100;Black+3D+%231 */ background: #45484d; /* Old browsers */ background: -moz-linear-gradient(45deg, #45484d 0%, #000000 100%); /* FF3.6-15 */ background: -webkit-linear-gradient(45deg, #45484d 0%,#000000 100%); /* Chrome10-25,Safari5.1-6 */ background: linear-gradient(45deg, #45484d 0%,#000000 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#45484d', endColorstr='#000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ } .bodyWrapper { background-color: #E9EBEE; transition: transform .3s ease-in-out; transform-origin: 100% 0 0; position: relative; } .bodyWrapper::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0); z-index: -1; transition: background-color .3s; } header { max-height: 350px; overflow: hidden; } header img { width: 100%; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .content { max-width: 650px; margin: 0 auto; } .content h1 { margin: 40px 0 20px 0; font-size: 2.3em; } .content p { margin: 20px 0; line-height: 1.4; } footer { background-color: #323232; text-align: center; height: 100px; padding: 30px; margin-top: 100px; } footer a { color: #efefef; } /* ######################### */ div.logo { width: 50px; height: 50px; position: absolute; top: 15px; right: 15px; cursor: pointer; z-index: 999; } rect[class^="cls-"] { fill: #efefef; } div.logo:hover rect { animation: logoHover .4s ease-out; } .cls-4, .cls-8 { animation-delay: .1s !important; } .cls-1, .cls-5, .cls-9 { animation-delay: .2s !important; } .cls-2, .cls-6 { animation-delay: .3s !important; } .cls-3 { animation-delay: .4s !important; } @keyframes logoHover { 0% {fill: #efefef;} 50% {fill: #FF5722;} 100% {fill: #efefef;} } /* ######################### */ body.menuToggle .bodyWrapper { transform: scale(.8) rotateY(-40deg); /* scale(.9) */ -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-shadow: 0 0 10px 0 rgba(0,0,0,0.75); -moz-box-shadow: 0 0 10px 0 rgba(0,0,0,0.75); box-shadow: 0 0 10px 0 rgba(0,0,0,0.75); } body.menuToggle .bodyWrapper::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 1; } /* .menuWrapper { position: abso.........完整代码请登录后点击上方下载按钮下载查看
网友评论0