我有一个 css 下拉菜单(如下),但是,我的问题是,一旦单击了下拉菜单选项(链接),这很讨厌,即。图 7 留下了一个未经处理的矩形细虚线焦点,该焦点在单击菜单选项后很久才出现。单击链接后如何删除链接的焦点?
<div id="menu" style="width: 1001px; height: 20px">
<ul>
<li><a href="#nogo"><div id="file">File</div></a>
<ul>
<li><a href="#nogo" onclick="window.print()"><div id="print">Print</div></a></li>
<li><a href="#nogo" onclick="sims_update()"><div id="save">Save</div></a></li>
<li><a href="#nogo" onclick="sims_update('s');window.close()"><div id="saveandexit">Save & Exit</div></a></li>
<li><a href="#nogo" onclick="window.close()"><div id="exit">Exit</div></a></li>
</ul>
</li>
<li><a href="#nogo"><div id="edit">Edit</div></a>
<ul>
<li><a href="#nogo" onclick="sims_addnew();return false"><div id="addnew">Add new</div></a></li>
<li><a href="#nogo"><div id="delete">Delete</div></a></li>
<li><a href="#nogo" onclick="sims_reset()"><div id="clear">Clear Form</div></a></li>
</ul>
</li>
<li><a href="#nogo"><div id="view">View</div></a>
<ul>
<li><a href="#nogo"><div id="goto_first">>> Go to First</div></a></li>
<li><a href="#nogo"><div id="goto_next">>Go to Next</div></a></li>
<li><a href="#nogo"><div id="goto_prev">Go to Previous></div></a></li>
<li><a href="#nogo"><div id="goto_last">Go to Last>></div></a></li>
</ul>
</li>
<li><a href="#nogo"><div id="reports">Reports</div></a>
<ul>
<li><a href="#nogo"><div id="export_excel">Export to Excel Table</div></a></li>
<li><a href="#nogo"><div id="export_html">Export to HTML Table</div></a></li>
<li><a href="#nogo" onclick="sims_compile_htmllist()"><div id="export_list">Export to HTML List</div></a></li>
</ul>
</li>
<li><a href="#nogo"><div id="logoff">Logoff</div></a></li>
</ul>
<ul>
</div>
</div>
CSS:
/*HORIZONTAL DROP-DOWN MENU */
#menuwrapper{
position: fixed;
top: 30px;
left: 0px;
background-color: #A9BBD3;
height: 19px;
color: #FFFFFF;
font-size: 8pt;
padding-top: 1px;
padding-left: 3px;
border-top: 1px solid #FFF;
width: 100%;
}
#menu{
padding:0;
margin:0;
position: fixed;
top: 31px;
left: 0px;
font-size: 8pt;
width: 1001px;
}
#menu ul{
padding:0;
margin:0;
}
#menu li{
position: relative;
list-style: none;
margin: 0;
padding:0;
float: left;
display:inline;
}
#menu li a{
width:125px;
height: 20px;
display: block;
text-decoration:none;
line-height: 20px;
background-color: #A9BBD3;
color: #FFF;
}
#menu li a:hover{
background-color: #446087;
}
#menu ul ul {
position: absolute;
top: 21px;
visibility: hidden;
}
#menu ul ul li a {
width: 120px;
padding-left: 5px;
filter:alpha(opacity=85);
}
#menu ul li:hover ul{
visibility:visible;
}
#menu > ul > li > a {
text-align:center;
}
#menu > ul > li > a:hover {
border-bottom: 1px solid #FFF;
}