http://nqmedia.co.uk/CSS下拉菜單消失
當我翻個人時,該選項似乎很快消失。
我認爲它與造型
這裏是我的代碼,這樣做:
.topmenu {float: right; width: 710px; height: 45px; background-color: #3a5a93; margin-top: 50px; border-top-left-radius: 10px 15px;border-top-right-radius: 10px 15px; border-bottom-left-radius: 10px 15px; border-bottom-right-radius: 10px 15px;}
.topmenu ul li {padding-top: 10px; float: left; margin-left: 10px;}
.topmenu ul li a:link {padding: 10px 20px; font: 14px genevaregular; color: #fff; text-decoration: none;}
.topmenu ul li a:visited {padding: 10px 20px; font: 14px genevaregular; color: #fff; text-decoration: none;}
.topmenu ul li a:hover {padding: 10px 20px; font: 14px genevaregular; color: #fff; text-decoration: none;}
.topmenu ul li a:active {padding: 10px 20px; font: 14px genevaregular; color: #fff; text-decoration: none;}
.topmenu ul li.current-menu-item a {color: #fff; }
.topmenu ul ul li {background-color: #3a5a93; padding:10px;float: none;}
.topmenu ul ul li:hover {background-color: #637ead; }
.topmenu ul ul {display: none; position: absolute; margin-top: 12px;}
.topmenu ul li:hover > ul {display: block;}
.topmenu ul ul li a {padding: 10px;}
它最好包含引起問題的特定HTML以及CSS。更好的是,創建一個問題代碼的jsfiddle。 – Lowkase 2013-02-26 19:44:59