.header{ width: 100%; height: 15vh; background-color: #030045; position: relative; margin-bottom: 0; margin-bottom: -1px; /* background: padding-box; */ display: flex; align-items: center; justify-content: center; } .header .bg{ width: 20vw; height: 35%; /* background: palegoldenrod; */ position: absolute; bottom: 0; left: 24vw; } .header .bg img{ width: 100%; height:auto; } .header .container{ width: 100%; height: 65%; display: flex; align-items: center; /* justify-content: space-around; */ /* background: palegoldenrod; */ } .logo{ width: 50%; height: 100%; display: flex; align-items: center; padding-left: 10vw; } .logo img{ width: 4vw; height: auto; max-height: 4vw; display: block; object-fit: contain; /* 保证图片不变形 */ } .header ul{ width: auto; height: 100%; display: flex; align-items: center; justify-content: center; /* background: palevioletred; */ margin-left: 5vw; /* padding-right: 10vw; */ } .header ul li{ /* width: 100%; */ min-width: 5vw; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 0.9vw; margin-left: 1vw; /* background: palegreen; */ } .header ul li a{ display: inline-block; color: #009FD1; transition: all 0.2s ease; font-weight: 600; font-size: 1vw; position: relative; padding-bottom: 2vh; } .header ul li a:hover{ font-size: 1vw; color: #fff; text-shadow: 0 0 10px rgba(41, 111, 216, 0.5); } /* .active{ background: palegoldenrod; } */ .actives::before{ content:url(../imgs/svg/页面选择图标.svg); width: 100%; height: auto; position: absolute; bottom: 0; left: 0; } .language{ /* width: 10%; */ /* height: 100%; */ /* background: palegoldenrod; */ /* line-height:5vh; */ padding-bottom: 2vh; border:none; outline: none; cursor: pointer; color: #009FD1; transition: all 0.2s ease; font-weight: 600; font-size: 1vw; background: transparent; margin-left: 1vw; } .language:hover{ color: #fff; text-shadow: 0 0 10px rgba(41, 111, 216, 0.5); } /* -------------------- */ /* 语言切换下拉框样式 */ .lang-dropdown { position: relative; display: inline-block; cursor: pointer; margin-bottom: 2vh; margin-left: 8px; } .lang-btn { display: flex; align-items: center; background-color: transparent; color: #ffffff; border: none; cursor: pointer; padding: 8px 12px; border-radius: 4px; font-size: 0.8vw; transition: all 0.3s ease; font-weight: 600; } .lang-btn:hover { background-color: rgba(255, 255, 255, 0.1); } .lang-btn img { width: 20px; height: 14px; margin-right: 8px; border-radius: 2px; object-fit: cover; } .lang-btn .arrow { margin-left: 8px; transition: transform 0.3s ease; } .lang-dropdown-content { display: none; position: absolute; right: 0; top: 100%; /* 确保设置了这个值 */ min-width: 120px; background-color: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); border-radius: 4px; z-index: 1000; overflow: hidden; } .lang-dropdown-content.show { display: block; animation: fadeIn 0.2s ease; } .lang-item { display: flex; align-items: center; padding: 10px 12px; color: #333; text-decoration: none; transition: all 0.2s ease; } .lang-item:hover { background-color: #f5f5f5; } .lang-item img { width: 20px; height: 14px; margin-right: 8px; border-radius: 2px; object-fit: cover; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }