我仍在处理我的页脚。所以我想要一个应该下拉到顶部的语言选择器。所以我试图找到一种方法来列出它们,但我不知道该怎么做!一切都会列出缺点。
HTML结构是这样的:
<div id="legals">
<div id="list2">
<span class="down">text large</span>
<ul class="nav2">
<li><a href="/one">one</a></li>
<li>|</li>
<li><a href="/two">two</a></li>
<li>|</li>
<li><a href="/three">three</a></li>
<li>|</li>
<li>select:</li>
</ul>
<ul class="flag"> -->here it starts
<li id="1"> -->just an image of a flag. when hover this, the divs below should be visible
<ul class="drop_down">
<div> -->as an container for the flags and label
<li id="en"></li>-->shows just an image<a href="#">one</a> -->will be the link
</div>
<div>
<li id="fr"></li><a href="#">two</a>
</div>
<div>
<li id="pl"></li><a href="#">three</a>
</div>
</ul>
</li>
</ul>
</div>
</div>
对于 CSS:
.footer #legals #list2 .flag {
width: 20px;
height: 10px;
margin-top: 14px;
margin-left: 8px;
float: left;
display: inline-block;
border: 1px solid #ccc;
}
.footer #legals #list2 .flag:hover {
border: 1px solid #fff;
}
.footer #legals #list2 .flag li{
width: 20px;
height: 10px;
display: inline-block;
float:left;
background-image:url(../images/flags.png);
}
.footer #legals #list2 .flag #en{
background-position: -40px;
}
/*HOVERSETTINGS*/
.footer #legals #list2 .flag li .drop_down{
display:none;
}
.footer #legals #list2 .flag li .drop_down div{
width: 100px;
height: 16px;
border-top: 1px solid #9fce23;
border-bottom: 1px solid #9fce23;
background-color: #f23;
display:block;
}
.footer #legals #list2 .flag li .drop_down div li{
width: 20px;
height: 10px;
background-image:url(../images/flags.png);
background-repeat: no-repeat;
border: 1px solid #ccc;
margin-top: 1px;
}
.footer #legals #list2 .flag li .drop_down div:hover{
color: #fff;
}
.footer #legals #list2 .flag li .drop_down div a{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #ccc;
font-weight:bolder;
text-align: left;
margin-left: 10px;
}
因此,如果有人可以帮助我,我将不胜感激。