具体代码如下所示:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <c:set var="front" value="${frontPath}${pageContext.request.contextPath}/f"/> <c:set var="ajaxUrl" value="${frontPath}${pageContext.request.contextPath}"/> <c:set var="ctxStatic" value="${pageContext.request.contextPath}/static"/> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <meta name="format-detection" content="telephone=no,email=no,adress=no"/> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-status-bar-style" content="black"/> <title>simpleNavFollowing</title> <style> * { margin: 0; padding: 0; } html, body { position: relative; height: 100%; } #nav { position: fixed; top: 50%; left: 20px; margin-top: -140px; display: inline-block; vertical-align: middle; } #nav a{ display: block; position: relative; width: 98px; height: 28px; line-height: 28px; text-align: center; background-color: #eee; color: #333; border-left: 2px solid transparent; } #nav a:hover{ width: 98px; border-left: 2px solid #4b59ff; } #nav a p{ position: relative; z-index: 3; } #nav a.active{ background-color: #4b59ff; color: #fff; } #main { max-width: 1200px; margin: 0 auto; } #main div { height: 300px; background-color: #efefef; border-top: 1px solid #ccc; } #main div:nth-child(2n) { background-color: #fafafa; } </style> <script src="/UploadFiles/2021-04-02/jquery-1.10.2.js">总结
以上所述是小编给大家介绍的jQuery 导航自动跟随滚动的实现代码,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
最新资源
- 令晴 Lynn《The Make》[320K/MP3][44.47MB]
- 令晴 Lynn《The Make》[Hi-Res][24bit 48kHz][F
- 雷婷《移情别恋HQⅡ》头版限量编号[低速原抓WAV
- FUNDAMENTAL.1989-感觉号渡轮【SONY】【WAV+CUE
- 上山安娜.1986-上山安娜【EMI百代】【WAV+CUE】
- 张真.1993-失恋十四行【上华】【WAV+CUE】
- 钟明秋《爱有天意HQCD》[低速原抓WAV+CUE]
- 孙云岗唢呐《金声玉振[HIFI珍藏版]》[低速原抓W
- 谭艳精讯TEST-CD试音39号》2CD[DTS-WAV]
- 姚璎格《发烧女中音》DSD版[低速原抓WAV+CUE][1