2016-07-26 49 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 
    } 
}