css hover: display:block;伪类在下拉菜单中的应用需要注意z-index的使用_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:59:19
Original
2545 people have browsed it

css:

.pr{position:relative;}
.pa{position:absolute;}

.userinfo2 .mylink2{z-index:1;display:none;width:80px;background:#fff;}

.userinfo2:hover .mylink2{display:block;}

以上用法,注意增加z-index这一句,否则,下拉菜单在遇到导航或其它元素时,可能会闪烁或意外隐藏等.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!