123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <!DOCTYPE html>
- <html lang="zh-cn">
- <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" />
- <meta http-equiv="Cache-Control" content="max-age=7200" />
- <title>Document</title>
- <style>
- .header_box {
- position: relative;
- margin: 0 auto;
- width: 13rem;
- height: 0.8rem;
- font-size: 0.14rem;
- }
- .header_box .header_left {
- float: left;
- cursor: pointer;
- }
- .header_box .header_left > img {
- display: inline-block;
- margin-top: 0.24rem;
- margin-right: 0.08rem;
- height: 0.32rem;
- }
- .header_box .header_left .left_white {
- display: inline-block;
- }
- .header_box .header_left .left_gray {
- display: none;
- }
- .header_box .header_right {
- float: right;
- }
- .header_box .header_right > .header_nav_item {
- position: relative;
- float: left;
- margin-left: 0.55rem;
- height: 0.8rem;
- line-height: 0.8rem;
- cursor: pointer;
- }
- .header_box .header_right > .header_nav_lang {
- position: relative;
- float: left;
- margin-left: 0.55rem;
- height: 0.8rem;
- line-height: 0.8rem;
- cursor: pointer;
- }
- .header_box .header_right > .header_nav_item > div::after {
- content: "";
- width: 0;
- position: absolute;
- background: #2d8cf0;
- height: 0.04rem;
- bottom: 0;
- left: 50%;
- transform: translateX(-50%);
- -webkit-transform: translateX(-50%);
- transition: all 0.3s ease-out;
- -webkit-transition: all 0.3s ease-out;
- }
- .header_box .header_right > .header_nav_item:hover > div::after,
- .header_box .header_right > .header_nav_item.selected > div::after {
- width: 100%;
- }
- .header_box .header_right > .header_nav_lang .nav_language_en {
- background-color: #2d8cf0;
- position: absolute;
- top: 0.6rem;
- left: 50%;
- transform: translateX(-50%) translateY(50%);
- -webkit-transform: translateX(-50%) translateY(50%);
- padding: 0.06rem 0;
- -webkit-transition: all 0.2s ease-in-out;
- transition: all 0.2s ease-in-out;
- visibility: hidden;
- opacity: 0;
- z-index: 100;
- text-align: center;
- font-size: 0.14rem;
- line-height: 0.4rem;
- color: #fff;
- border-radius: 0.08rem;
- }
- .header_box .header_right > .header_nav_lang:hover .nav_language_en {
- display: block;
- visibility: visible;
- transform: translateX(-50%) translateY(0%);
- -webkit-transform: translateX(-50%) translateY(0%);
- opacity: 1;
- }
- .header_box
- .header_right
- > .header_nav_lang:hover
- .nav_language_en::after {
- border-left: 0.07rem solid transparent;
- border-right: 0.07rem solid transparent;
- border-top: 0.09660254rem solid #2d8cf0;
- width: 0;
- height: 0;
- content: "";
- position: absolute;
- top: -0.08rem;
- left: 50%;
- transform: translateX(-50%) rotate(180deg);
- -webkit-transform: translateX(-50%) rotate(180deg);
- }
- .header_box .header_right > .header_nav_lang:hover .nav_language_en a {
- color: #fff;
- display: block;
- padding: 0;
- margin: 0 0.12rem;
- transition: all 0.3s ease-out;
- -webkit-transition: all 0.3s ease-out;
- text-decoration: none;
- }
- </style>
- </head>
- <body>
- <div class="header_box">
- <div class="header_left">
- <img class="left_white header_logo" src="../img/logo_info/header_logo.png" />
- <img class="left_white header_title" src="../img/logo_info/header_title.png" />
- <img class="left_gray header_logo" src="../img/logo_info/header_logo1.png" />
- <img class="left_gray header_title" src="../img/logo_info/header_title1.png" />
- </div>
- <div class="header_right">
- <div data-nav="1" class="header_nav_item nav_1">
- <div>产品中心</div>
- </div>
- <div data-nav="2" class="header_nav_item nav_2">
- <div>服务案例</div>
- </div>
- <div data-nav="3" class="header_nav_item nav_3">
- <div>关于我们</div>
- </div>
- <div data-nav="4" class="header_nav_item nav_4">
- <div>申请试用</div>
- </div>
- <div data-nav="5" class="header_nav_item nav_5">
- <div>新闻资讯</div>
- </div>
- <div class="header_nav_lang">
- <div>中文 | English</div>
- </div>
- <!-- <div class="header_nav_lang">
- 中文
- <div class="nav_language_en">
- <a href="#" target="_blank">English</a>
- </div>
- </div> -->
- </div>
- </div>
- <script>
- $(function() {
- $(".header_box .header_left").click(function () {
- if (window.location.pathname !== "/index.html") {
- window.location.href = "/index.html";
- }
- });
- let nav_info = $(".header_root").data("nav_info");
- $(".header_box > .header_right > .header_nav_item").removeClass("selected");
- if (nav_info) {
- $(".header_box > .header_right > .header_nav_item.nav_" + nav_info).addClass("selected");
- }
- $(".header_box > .header_right").on("click", ".header_nav_item", function (ev) {
- $(".header_box > .header_right > .header_nav_item").removeClass("selected");
- let nav_num = $(this).data("nav");
- $(".header_box > .header_right > .header_nav_item.nav_" + nav_num).addClass("selected");
- if (nav_num === 1) {
- if (window.location.pathname !== "/sections/product.html") {
- window.location.href = "/sections/product.html";
- }
- } else if (nav_num === 2) {
- if (window.location.pathname !== "/sections/service.html") {
- window.location.href = "/sections/service.html";
- }
- } else if (nav_num === 3) {
- if (window.location.pathname !== "/sections/about.html") {
- window.location.href = "/sections/about.html";
- }
- } else if (nav_num === 4) {
- if (window.location.pathname !== "/sections/trial.html") {
- window.location.href = "/sections/trial.html";
- }
- } else if (nav_num === 5) {
- if (window.location.pathname !== "/sections/news.html") {
- window.location.href = "/sections/news.html";
- }
- }
- });
- let _pathname = window.location.pathname;
- if (_pathname === "/index.html" || _pathname === "/") {
- $(window).on("scroll", function() {
- let top = $(window).scrollTop();
- if(top > 100){
- $(".header_root").addClass("bg_white");
- } else {
- $(".header_root").removeClass("bg_white");
- }
- });
- }
- });
- </script>
- </body>
- </html>
|