Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Full-Width Menu
& SVG Weirdness
Home
Tour
Features
Contact
css
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css); @import url("https://fonts.googleapis.com/css?family=Titan+One"); body { background: linear-gradient(to top, #7b00e0, #ff006a); margin: 0; height: 100%; overflow: hidden; } .container { width: 100%; height: 100vh; margin: 0 auto; overflow: hidden; } .menu-container { background-color: #ffc901; border-radius: 100%; color: white; cursor: pointer; position: absolute; width: 300px; height: 300px; left: -120px; top: -120px; transition: all 0.3s; } .menu-container.full-menu { border-radius: 0; padding: 0 !important; position: aboslute; width: 100%; height: 100%; left: 0; top: 0; transition: all 0.3s; } .full-menu .menu { top: 40px; left: 40px; } .menu { color: white; font-size: 3.5em; position: absolute; top: 160px; left: 160px; z-index: 100; transition: all 0.3s; } .menu i { opacity: 0.7; transform: scale(1); transition: all 0.3s; } .menu i:hover { opacity: 1; transform: scale(1.2); transition: all 0.3s; } .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 0%; opacity: 0; visibility: hidden; overflow: hidden; } .overlay.open { opacity: .9; visibility: visible; height: 100%; } .overlay.open li { animation: fadeInRight .5s ease forwards; animation-delay: .35s; } .overlay.open li:nth-of-type(2) { animation-delay: .4s; } .overlay.open li:nth-of-type(3) { animation-delay: .45s; } .overlay.open li:nth-of-type(4) { animation-delay: .50s; } .overlay nav { font-size: 3.2em; font-family: "Titan One", san-serif; position: relative; height: 70%; top: 50%; transform: translateY(-50%); font-weight: 400; text-align: center; } .overlay ul { list-style: none; padding: 0; margin: 0 auto; display: inline-block; position: relative; height: 100%; } .overlay ul li { display: block; height: 25%; height: calc(100% / 4); min-height: 50px; position: relative; opacity: 0; } .overlay ul li a { display: block; position: relative; color: #fff; text-decoration: none; overflow: hidden; opacity: 0.7; transform: scale(1); transition: all 0.3s; } .overlay ul li a:hover, .overlay ul li a:focus, .overlay ul li a:active { opacity: 1; transform: scale(1.2); transition: all 0.3s; } @keyframes fadeInRight { 0% { opacity: 0; left: 20%; } 100% { opacity: 1; left: 0; } } h1 { font-size: 5em; font-family: "Titan One", san-serif; background-color: rgba(255, 0, 106, 0.4); border-radius: 100%; box-shadow: 0 0 2em 1em rgba(255, 0, 106, 0.4); color: white; margin: 30vh auto; position: relative; text-align: center; text-shadow: 0 8px 0 rgba(123, 0, 224, 0.4); transform: rotate(-12deg); width: 800px; height: auto; z-index: -1; } h1 span { color: #ffc901; } .blob { animation: blobby 4s infinite; } .blob2 { animation: blobby2 6s infinite; } @keyframes blobby { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } } @keyframes blobby2 { 0% { transform: scale(1); } 50% { transform: scale(1.18); } 100% { transform: scale(1); } } svg { position: absolute; top: 0; } #svg-right { display: block; fill: #7b00e0; opacity: 0.5; right: 0; width: 60%; z-index: -10; } #svg-left { fill: #ff006a; margin: 0; width: 60%; z-index: -10; } @media all and (max-width: 980px) { h1 { font-size: 3em; font-family: "Titan One", san-serif; } } @media all and (max-width: 480px) { h1 { font-size: 2em; font-family: "Titan One", san-serif; } }
JavaScript
const menu = document.querySelector('#toggle'); const menuItems = document.querySelector('#overlay'); const menuContainer = document.querySelector('.menu-container'); const menuIcon = document.querySelector('i'); function toggleMenu(e) { menuItems.classList.toggle('open'); menuContainer.classList.toggle('full-menu'); menuIcon.classList.toggle('fa-bars'); menuIcon.classList.add('fa-times'); e.preventDefault(); } menu.addEventListener('click', toggleMenu, false);
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>全屏菜单和SVG动画-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号