* { box-sizing: border-box; } body { background: url(body-bg.jpg) center top repeat-x; } .container { width: 1300px; margin: 0 auto; } .head { height: 189px; width: 100%; background: url(top-bg.png) no-repeat center; } .head .top { display: flex; align-items: center; height: 100%; justify-content: space-between; } .head a { display: inline-block; text-align: center; } .head .top-l img { width: 845px; } .head .top-r img { width: 430px; } .nav { background-color: #154d9b; } .nav-box { display: flex; margin: 0 auto; height: 62px; align-items: center; justify-content: space-between; } .navbar { display: flex; align-items: center; flex-wrap: wrap; } .navbar li + li { margin-left: 10px; } .navbar li a { font-size: 16px; color: #fff; } .navbar li .zhsk { content: url(nav_zhsk.png); width: 73px; height: 21px; } .navbar li .ggw { content: url(nav_gaige.png); width: 50px; height: 21px; } .navbar li .cxgc { content: url(nav_cxgc.png); width: 73px; height: 21px; } .search { position: relative; } .search .icon { width: 30px; height: 30px; cursor: pointer; background: url(navrarr.jpg) no-repeat center; } .search-container { visibility: hidden; opacity: 0; position: absolute; background: #ccc; padding: 12px 13px; border-radius: 8px; display: flex; align-items: center; box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2); right: -30px; top: 40px; transition: opacity 0.3s ease, visibility 0.3s ease; } .search:hover .search-container { visibility: visible; opacity: 1; } .search-container::before { content: ''; position: absolute; top: -8px; right: 35px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 10px solid #ccc; width: 0; height: 0; } .search-input { width: 240px; height: 36px; border: none; border-radius: 3px; font-size: 14px; background-color: #fff; padding: 0 10px; outline: none; } .search-input::placeholder { color: #aaa; } .search-button { flex: none; padding: 0 10px; height: 36px; border: none; background: white; color: black; font-size: 14px; cursor: pointer; border-radius: 3px; margin-left: 5px; box-shadow: inset 0px 0px 2px rgba(0, 0, 0, 0.1); } .search-button:hover { background: #eee; } .fade-box, .fade-img { height: 250px; position: relative; overflow: hidden; } .fade-img a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .fade-img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; } .fade-btn { position: absolute; width: 34px; height: 68px; top: 50%; transform: translateY(-50%); background: url(swiper-arrow.png) center no-repeat; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; z-index: 10; } .fade-left { left: 40px; background-position: left; } .fade-right { right: 40px; background-position: right; } .fade-box:hover .fade-btn { opacity: 0.7; visibility: visible; } footer .link { background-color: #0e3890; height: 56px; } .link-box { height: 56px; display: flex; align-items: center; justify-content: space-between; } .link-box .link-item { height: 100%; line-height: 56px; position: relative; } .link-box a { display: inline-block; } .link-box span { vertical-align: middle; font-size: 16px; color: #fff; } .dropdown img { margin-left: 5px; transition: transform 0.3s; } .dropdown-box { position: absolute; bottom: 56px; left: 50%; width: 240px; transform: translateX(-50%); background-color: #fff; border: 1px solid #ccc; visibility: hidden; opacity: 0; height: 250px; font-size: 14px; color: #000; overflow-y: auto; transition: opacity 0.3s, visibility 0.3s; } .dropdown:hover .dropdown-box { visibility: visible; opacity: 1; } .dropdown-box .dropdown-title { color: #0e3890; font-weight: bold; text-align: center; font-size: 16px; background-color: #e2e2e2; } .dropdown-box li { line-height: 28px; } .dropdown-box li a { height: 100%; width: 100%; display: block; padding: 0 10px; } .dropdown-box li a:hover { background-color: #0e3890; color: #fff; } .dropdown:hover img { transform: rotate(180deg); } footer .info { background-color: #f2f2f2; } .info-box { display: flex; font-size: 14px; color: #404040; height: 215px; align-items: center; justify-content: space-between; } .info-logo { display: inline-block; height: 50px; } .info-logo img { width: 544px; height: 41px; } .info .qrcode { text-align: center; margin-left: 40px; } .info .qrcode img { width: 130px; height: 130px; } .info-r { display: flex; } .underline { background-color: #e2e2e2; } .underline-box { height: 46px; font-size: 14px; line-height: 46px; text-align: center; color: #404040; } .underline-box a{ display: inline-block; } .underline-box a:hover{ color: #c92e1a; } @media screen and (max-width: 768px) { .container { width: 100%; } .head{ height: unset; } .head .top { flex-direction: column; justify-content: center; align-items: center; margin-top: 50px; } .head .top-l img{ width: 90%; } .head .top-r{ margin-top: 20px; } .head .top-r img{ width: 60%; } .nav-box{ height: unset; } .navbar{ justify-content: start; } .navbar li{ /* flex: 1 0 33.3%; */ width: 33.3%; text-align: center; } .navbar li + li{ margin-left: 0; } .info-box{ flex-direction: column; height: unset; justify-content: center; align-items: center; } .info-logo img{ width: 80%; } }