jquery粘性菜单点击效果
代码语言:html
所属分类:菜单导航
代码描述:jquery粘性菜单点击效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700,900&display=swap" rel="stylesheet"> <style> #nav-1 { position: relative; border: none; border-radius: 10em; display: -webkit-box; display: flex; list-style: none; background: #f5f5f5; box-shadow: 20px 40px 40px #00000033; padding: 10px; } #nav-1 li { margin: 0px; } #nav-1 li a { position: relative; padding: 0.6em 2em; font-size: 18px; border: none; outline: none; color: #333; display: inline-block; text-decoration: none; z-index: 3; } #nav-1 .slide1, #nav-1 .slide2 { position: absolute; display: inline-block; height: 3em; border-radius: 10em; -webkit-transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1.05); transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1.05); } #nav-1 .slide1 { background-color: yellowgreen; z-index: 2; } #nav-1 .slide2 { opacity: 0; background: #ddd; z-index: 1; } #nav-1 .squeeze { -webkit-transform: scale(0.9); transform: scale(0.9); } *, *::before, *::after { box-sizing: border-box; } html, body { height: 100%; } body { display: -webkit-box; display: flex; -webkit-box-pack: center; justify-content: center; -webkit-box-align: center; align-items: center; background-color: #e0e0e0; font-family: Montserrat, sans-serif; line-height: 1.5; background: linear-gradient(160deg, #4567b2 20%, #8ab9ff 20%, #8ab9ff 80%, #4567b2 80%); } </style> <.........完整代码请登录后点击上方下载按钮下载查看
网友评论0