2016-07-26 41 views
-1

我试图用这个代码,但是我的列表显示在页面使用类和@media CSS

@media(max-width: 900px){ 
ul{  
    width:100%;  
}  
ul li{ 
    width:100%; 
} 

ul li a { 
    text-align:center; 
    width:100%;  
    height:30px;  
    line-height:30px; 
    background-color:rgba(255,255,255,0.7); 
    outline:rgba(255,255,255,0.9) solid 1px; 
} 

左侧的保证金,我不知道我应该用什么指令或改变什么使有没有左边距我有一个头与此类

header {  
    margin-top:0px; 
    background-color:rgba(255,255,255,0.7); 
    height:140px;   
} 
+0

尝试添加ul {margin-left:0px;}默认情况下,ul元素左边有一些余量。让我知道它是否有效。 –

+2

你可以创建一个小提琴可能或至少张贴HTML? –

回答

0

喜用这种

@media(max-width: 900px){ 
    // you can write your css here 

    .class{ 
     // write your css property 
    } 
}