如何延长菜单悬停显示的时间?

时间:2019-05-19 15:00:18

标签: html css wordpress

我在桌面视图中有一个菜单,该菜单效果很好,但是如果用户将光标停留在菜单上并且几秒钟不动,那么一旦他们再次移动光标进行选择,菜单就会消失并且用户必须再次选择它。用户单击菜单后,无论如何将其悬停在菜单上多长时间(无论是否处于休眠状态),如何将菜单保留在那里。仅当用户单击栏,主页(菜单按钮)或fa fa-angle down时,它才真正消失,即使它们不再徘徊。

在移动设备视图中可以。

<div class="collapse navbar- 
collapse navbar-ex1-collapse"><ul 
id="menu" class="menu"><li 
id="menu-item-1496" class="menu- 
item menu-item-type-post_type menu- 
item-object-page menu-item-home 
current-menu-item page_item page- 
item-19 current_page_item menu- 
item-has-children menu-item-1496 
dropdown active"><a title="Home" 
href="https://adsler.co.uk/">Home 
</a><span class="dropdown-toggle 
shapely-dropdown" data- 
toggle="dropdown"><i class="fa fa- 
angle-down" aria-hidden="true">. 
</i>. </span>
<ul role="menu" class=" dropdown-menu">
<li id="menu-item-1502" class="fa fa-user menu-item menu-item-type-post_type menu-item-object-page menu-item-1502"><a title="Create Adsler Account" href="https://adsler.co.uk/create-account/">Create Adsler Account</a></li>
<li id="menu-item-1499" class="fa fa-envelope menu-item menu-item-type-post_type menu-item-object-page menu-item-1499"><a title="Post an Ad" href="https://adsler.co.uk/wp-user-test-dashboard-2/awpcp-place-ad/">Post an Ad</a></li>
<li id="menu-item-1504" class="fa fa-tag menu-item menu-item-type-post_type menu-item-object-page menu-item-1504"><a title="For Sale" href="https://adsler.co.uk/for-sale/">For Sale</a></li>
<li id="menu-item-2955" class="fa fa-globe menu-item menu-item-type-post_type menu-item-object-page menu-item-2955"><a title="Browse Adsler" href="https://adsler.co.uk/browse-adsler/">Browse Adsler</a></li>
<li id="menu-item-1497" class="fa fa-arrow-circle-right menu-item menu-item-type-post_type menu-item-object-page menu-item-1497"><a title="Adsler Login" href="https://adsler.co.uk/account-login/">Adsler Login</a></li>
<li id="menu-item-1505" class="fa fa-question-circle menu-item menu-item-type-post_type menu-item-object-page menu-item-1505"><a title="Help and Contact" href="https://adsler.co.uk/help-and-contact/">Help and Contact</a></li>
<li id="menu-item-1511" class="fa fa-key menu-item menu-item-type-post_type menu-item-object-page menu-item-1511"><a title="Reset Password" href="https://adsler.co.uk/reset-password/">Reset Password</a></li>
<li id="menu-item-1508" class="fa fa-arrow-circle-left menu-item menu-item-type-post_type menu-item-object-page menu-item-1508"><a title="Log Out" href="https://adsler.co.uk/log-out/">Log Out</a></li>
<li id="menu-item-1501" class="fa fa-envelope menu-item menu-item-type-post_type menu-item-object-page menu-item-1501"><a title="Contact Us" href="https://adsler.co.uk/contact-us/">Contact Us</a></li>
<li id="menu-item-2003" c

Css:

li#menu-item-2952 a {
background-color: unset!important;
}
ul.dropdown-menu li a {
    color: black!important;
}
li#menu-item-2952 a:hover {
background-color: white!important;}

我在猜..

ul.dropdown-menu li a: hover { 
then-what??} 

此外,也许a不应存在,因为菜单空间也应该是可悬停的。

0 个答案:

没有答案