<style>
#first {
Display:flex;
Justify-content:space-between;
}
li{
List-style-type:none;
border:1px solid #999;
width:150px;
height:50px;
line-height:50px;
Text-align:center;
Background-color:pink;
Color:white;
}
div{
Display:flex;
Justify-content:space-between;
}
. active{
Background-color:darkgrey;
}
. show{
Display:block;
}
. style{
Display:none;
}
li>ul{
Display:none;
Margin-left: -41px;
}
</style>
<body>
<ul id= "First" >
<li onmouseover= "Hov (' one ', this)" onmouseout= "Out (' single ', this)" > List A//set mouse Move-out event for each menu bar
<ul id= "One" >
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
</ul>
</li>
<li onmouseover= "Hov (' two ', this)" onmouseout= "Out (' dual ', this)" > List II
<ul id= "both" >
<li>11</li>
<li>22</li>
<li>33</li>
<li>44</li>
</ul>
</li>
<li onmouseover= "Hov (' three ', this)" onmouseout= "Out (' three ', this)" > List III
<ul id= "three" >
<li>55</li>
<li>66</li>
<li>77</li>
<li>88</li>
</ul>
</li>
<li onmouseover= "Hov (' four ', this)" onmouseout= "Out (' si ', this)" > List IV
<ul id= "Four" >
<li>88</li>
<li>433</li>
<li>222</li>
<li>124</li>
</ul>
</li>
</ul>
<script>
Function Hov (id1,e) {
var num = document.queryselector ("#" + id1);
Num.classname= "Show";
E.classname= "Active";
}
function out (id1,e) {
var num = document.queryselector ("#" + id1);
Num.classname= "";
E.classname= "";
}
</script>
</body>
Use mouse to move out of the event,,,,,,,,,,,,,,,
The tab toggle of the JS level two menu bar