我的页面上有一个菜单设置,可以将项目加载到iframe中。它们是自定义Map,可以替换默认的GoogleMap。我的问题是如何让当前显示项目的菜单项保持高亮显示?
<div id="right_col" class="clearfix">
<ul>
<li><a href="copperwood.html" target="iframe_map">Copperwood</a></li>
<li><a href="canyoncrest.html" target="iframe_map">Canyon Crest/The Canyons</a></li>
<li><a href="riverstone.html" target="iframe_map">Riverstone</a></li>
<li><a href="garrystation.html" target="iframe_map">Garry Station</a></li>
<li><a href="legacyridge.html" target="iframe_map">Legacy Ridge</a></li>
<li><a href="https://maps.google.com/maps/ms?msa=0&msid=217268423195093625679.0004cf68eb14897eb07b4&ie=UTF8&ll=49.69371,-112.868754&spn=0.086835,0.089951&t=m&output=embed" target="iframe_map">Overall Lethbridge</a></li>
</ul>
</div>
我的CSS:
#right_col ul{
position: relative;
list-style: none;
top: -17px;
}
#right_col ul a{
text-decoration: none;
color: #000000;
display: block;
padding:10px 10px 10px 15px;
margin: 10px;
background: #eeeeee;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px; /* for old Konqueror browsers */
}
#right_col ul a:hover{
background: #e9b900;
text-decoration: none;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px; /* for old Konqueror browsers */
}
1条答案
按热度按时间qltillow1#
1.为第一个
li
标记指定一个类,例如li class="active"..
2.转到你的css,然后执行以下操作:
3.那就打开