fullpage.js实现自适应全屏滚动带菜单跳转效果展示代码
代码语言:html
所属分类:加载滚动
代码描述:fullpage.js实现自适应全屏滚动带菜单跳转效果展示代码,菜单也是自适应的,锚点内导航跳转。
代码标签: fullpage 自适应 全屏 滚动 菜单 跳转
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/fullpage.4.0.19.css"> <style> /* RESET-GENERAL STYLES –––––––––––––––––––––––––––––––––––––––––––––––––– */ * { margin: 0; padding: 0; box-sizing: border-box; } a { text-decoration: none; color: white; } button { border: none; background: none; cursor: pointer; } ul, li { list-style-type: none; } /* MENU STYLES –––––––––––––––––––––––––––––––––––––––––––––––––– */ .header-top { position: fixed; top: 0; left: 0; width: 100%; height: 70px; padding: 0 10px; z-index: 12; display: flex; align-items: center; justify-content: space-between; background: rgba(0, 47, 77, 0.3); } .header-top .logo { display: flex; align-items: center; } .header-top .toggle-menu { position: relative; width: 50px; height: 50px; } .header-top .toggle-menu i { position: absolute; left: 10px; width: 30px; height: 2px; background: white; transition: all 0.3s; } .header-top .toggle-menu i:nth-child(1) { top: 16px; } .header-top .toggle-menu i:nth-child(2) { top: 24px; } .header-top .toggle-menu i:nth-child(3) { top: 32px; } .header-top.open-menu i:nth-child(1) { top: 25px; transform: rotateZ(45deg); } .header-top.open-menu i:nth-child(2) { background: transparent; } .header-top.open-menu i:nth-child(3) { top: 25px; transform: rotateZ(-45deg); } .menu-wrapper { position: absolute; top: 70px; left: 0; width: 100%; height: 0; opacity: 0; background: rgba(0, 47, 77, 0.25); transition: all 3s; } .header-top.open-menu ~ .menu-wrapper { opacity: 1; padding: 80px 0; z-index: 101; height: calc(100vh - 70px); } .menu-wrapper ul { display: flex; padding: 0 10px; } .menu-wrapper li { flex: 1; } .menu-wrapper li a { display: block; padding: 30px; fo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0