任何人都可以帮我做一个垂直导航栏(媒体查询)

时间:2014-05-15 09:20:34

标签: html css

我只是要求你的伙伴帮助获得一个垂直导航栏,当它出现这样一个特定的问题时,很难在互联网上找到帮助,所以任何答案都会受到赞赏......这个用于480 x 800的媒体查询。

@media screen and (min-width:480px) and (max-width:800px){ #header{ height:100px; width:480px; } #nav{ padding: 15px; } #nav li ul{ list-style-type: none; padding: 15px; margin-left: 0; border-right:none; } #nav li a{ text-decoration: none; background-color: #ffffff; display: block; width: 8em; border-bottom:1px solid #eb322c; padding: 15px; } 

1 个答案:

答案 0 :(得分:0)

使用此css更改媒体查询css

@media screen and (min-width:480px) and (max-width:800px){
#header{
height:100px;
width:480px;
}

#nav{ 
padding: 5px;
position: absolute;
left: 0px;
width: 150px;    
}
#nav ul {
padding: 5px;
border-left: 1px;
text-align: center;
 width: 150px;}

#nav li ul{
list-style-type: none;      
padding: 15px;      
margin-left: 0; 
border-right:none;

}

#nav li a{
text-decoration: none;            
background-color: #ffffff;      
display: block;      
width: 8em; 
border-bottom:1px solid #eb322c;
padding: 15px;    


}