12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- html,
- body {
- margin: 0;
- padding: 0;
- }
- .header_html_root {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 0 auto;
- width: 1000px;
- font-size: 16px;
- line-height: 50px;
- font-weight: bold;
- box-sizing: border-box;
- }
- .header_html_root .header_html_item {
- margin: 0 24px;
- padding: 0 10px;
- color: #333;
- border-bottom: 4px solid transparent;
- cursor: pointer;
- }
- .header_html_root .header_html_item:hover,
- .header_html_root .header_html_item.selected {
- border-bottom: 4px solid #2d8cf0;
- }
- </style>
- </head>
- <body>
- <div class="header_html_root">
- <div class="header_html_item" data-url="index">用户信息</div>
- <div class="header_html_item" data-url="history">发展历程</div>
- <div class="header_html_item" data-url="service">服务案例</div>
- <div class="header_html_item" data-url="school">学校图标</div>
- <div class="header_html_item" data-url="trial">申请试用</div>
- <div class="header_html_item" data-url="news">新闻资讯</div>
- <div class="header_html_item" data-url="log">登录日志</div>
- </div>
- <script>
- let page_url = $(".top_header_root").data("header_page");
- $('.header_html_root .header_html_item[data-url="' + page_url + '"]').addClass("selected");
- $(".header_html_root").on("click", ".header_html_item", function () {
- let _url = $(this).data("url");
- if (_url === "index") {
- window.location.href = "/index.html";
- } else {
- window.location.href = "/sections/" + _url + ".html";
- }
- });
- </script>
- </body>
- </html>
|