div+js实现粘性菜单导航效果代码

代码语言:html

所属分类:其他

代码描述:div+js实现粘性菜单导航效果代码,可点击导航条进行页面滚动。

代码标签: div js 粘性 菜单 导航

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  <meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.4.0.css">
  
<style>
/*
 I was initially planning of a simpler CSS style but this got more complicated as I progress.
 I'm leaving these classnames as it is, as I don't feel like naming these class names
 properly anymore 😅
*/

@import url('https://fonts.googleapis.com/css2?family=Croissant+One&family=Luckiest+Guy&family=Montserrat&family=Paytone+One&display=swap');

body {
	font-family: sans-serif;
	overflow: hidden;
}

main {
	max-height: 100vh;
	overflow: auto;
	position: relative.........完整代码请登录后点击上方下载按钮下载查看

网友评论0