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>
<div class="buttonitem buttonsize">
<div class="dropdown buttonsize">
<span class="goodlink" id="downloadlink">
<span class="goodlinknormal" id="downloadlink">
软件下载
</span>
<div class="dropdown-content ">
@ -42,7 +42,7 @@
</div>
<div class="buttonitem buttonsize">
<div class="dropdown buttonsize">
<span class="goodlink" id="contactme">
<span class="goodlinknormal" id="contactme">
交流群
</span>
<div class="dropdown-content ">
@ -55,7 +55,7 @@
</div>
<div class="buttonitem buttonsize">
<div class="dropdown buttonsize">
<span class="goodlink" id="contactme">
<span class="goodlinknormal">
语言/Language
</span>
<div class="dropdown-content ">

View File

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

View File

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