This commit is contained in:
恍兮惚兮 2024-07-19 00:08:52 +08:00
parent 114ff6e43c
commit d5c817506d
3 changed files with 9 additions and 7 deletions

View File

@ -26,7 +26,7 @@
href="https://lunatranslator.xyz/" id="homepage">官方网站</a></div> href="https://lunatranslator.xyz/" id="homepage">官方网站</a></div>
<div class="buttonitem buttonsize"> <div class="buttonitem buttonsize">
<div class="dropdown buttonsize"> <div class="dropdown buttonsize">
<span class="goodlink" id="downloadlink"> <span class="goodlinknormal" id="downloadlink">
软件下载 软件下载
</span> </span>
<div class="dropdown-content "> <div class="dropdown-content ">
@ -42,7 +42,7 @@
</div> </div>
<div class="buttonitem buttonsize"> <div class="buttonitem buttonsize">
<div class="dropdown buttonsize"> <div class="dropdown buttonsize">
<span class="goodlink" id="contactme"> <span class="goodlinknormal" id="contactme">
交流群 交流群
</span> </span>
<div class="dropdown-content "> <div class="dropdown-content ">
@ -55,7 +55,7 @@
</div> </div>
<div class="buttonitem buttonsize"> <div class="buttonitem buttonsize">
<div class="dropdown buttonsize"> <div class="dropdown buttonsize">
<span class="goodlink" id="contactme"> <span class="goodlinknormal">
语言/Language 语言/Language
</span> </span>
<div class="dropdown-content "> <div class="dropdown-content ">

View File

@ -47,10 +47,12 @@ for (let i = 0; i < dropdowns.length; i++) {
let dropdown = dropdowns[i] let dropdown = dropdowns[i]
dropdown.addEventListener('mouseover', function () { dropdown.addEventListener('mouseover', function () {
this.getElementsByClassName('goodlinknormal')[0].classList.add('goodlinkhover')
let dropdownContent = this.querySelector('.dropdown-content'); let dropdownContent = this.querySelector('.dropdown-content');
dropdownContent.style.display = 'block'; dropdownContent.style.display = 'block';
}); });
dropdown.addEventListener('mouseout', function () { dropdown.addEventListener('mouseout', function () {
this.getElementsByClassName('goodlinknormal')[0].classList.remove('goodlinkhover')
let dropdownContent = this.querySelector('.dropdown-content'); let dropdownContent = this.querySelector('.dropdown-content');
dropdownContent.style.display = 'none'; dropdownContent.style.display = 'none';
}); });

View File

@ -47,10 +47,10 @@
.dropdown-content { .dropdown-content {
display: none; display: none;
position: absolute; position: absolute;
background-color: rgba(255, 255, 255, 0.9); background-color: white;
} }
.goodlink { .goodlink , .goodlinknormal {
text-decoration: none; text-decoration: none;
color: black; color: black;
line-height: 50px; line-height: 50px;
@ -58,9 +58,9 @@
} }
.goodlink:hover { .goodlink:hover , .goodlinkhover{
color: deepskyblue; color: deepskyblue;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 192, 203, 0.3);
} }