我想改变我的旧网站的菜单是移动友好,有一个问题是如何“菜单元素”被显示在小屏幕上。响应CSS菜单元素定位
菜单由3个元素(左,中,右),现在在小屏幕上的,它们垂直进去相同的顺序。
但我想知道,如果可能用CSS让他们这样的位置,其中中间保持其位置而左,右下它移动,还是需要一些更多的花样。
如何实现的呢?
http://img834.imageshack.us/img834/2203/menuse.jpg
编辑,添加简单的代码是我用打转转:
<div id="header">
<div id="Bholder">
<div id="AButton"></div>
<div id="HButton"></div>
<div id="CButton"></div>
</div>
</div>
CSS
#Bholder{
margin-left: auto;
margin-right: auto;
max-width: 750px;
}
#AButton{
float: left;
width: 250px;
height:100px;
background-color: red;
}
#CButton{
float: left;
width: 250px;
height:100px;
background-color: green;
}
#HButton{
float: left;
width: 250px;
height:100px;
background-color: yellow;
}
@media only screen and (max-width: 767px){
#Bholder{
margin-left: auto;
margin-right: auto;
max-width: 250px;
}
}
请张贴一些代码。 – j08691