完善:实验一 导航栏 搜索下拉菜单样式

This commit is contained in:
2025-02-28 00:31:15 +08:00
parent a0085425e0
commit f1faa5fe3a
3 changed files with 34 additions and 2 deletions
+3
View File
@@ -2,8 +2,11 @@
"liveServer.settings.port": 5543, "liveServer.settings.port": 5543,
"cSpell.words": [ "cSpell.words": [
"dropbtn", "dropbtn",
"heima",
"itcast",
"navobj", "navobj",
"regobj", "regobj",
"Reseverd",
"typeobj" "typeobj"
] ]
} }
+29
View File
@@ -195,3 +195,32 @@
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
} }
/* 搜索下拉菜单 */
#search_form {
padding: 0.8em;
margin-left: -100px;
}
#search_form form input {
height: 2em;
margin-right: 0.5em;
border: 1px;
border-style: solid;
padding-left: 0.5em;
}
#search_form form button {
height: 2em;
width: 3em;
background: rgb(240, 120, 24);
border: 2px;
border-style: solid;
border-color: rgb(240, 120, 24);
color: rgb(255, 255, 255);
}
#search_form form button:hover {
background: rgb(255, 255, 255);
color: rgb(240, 120, 24);
}
+2 -2
View File
@@ -46,9 +46,9 @@
<a href="#" class="dropbtn" id="nav_search_svg" <a href="#" class="dropbtn" id="nav_search_svg"
><img src="assets/navbar/search.svg" alt="搜索" class="nav_svg" ><img src="assets/navbar/search.svg" alt="搜索" class="nav_svg"
/></a> /></a>
<div class="dropdown-content"> <div class="dropdown-content" id="search_form">
<form action="#" style="display: flex"> <form action="#" style="display: flex">
<input type="text" /> <input type="text" name="search_quest" placeholder="搜索……" />
<button type="submit">搜索</button> <button type="submit">搜索</button>
</form> </form>
</div> </div>