2014-01-08 98 views
0

背景圖像不會在以下樣式的不同桌面屏幕上調整大小。這裏有什麼問題?調整背景大小圖像不同的桌面屏幕大小

@media 
only screen and (min-resolution: 2dppx) and (min-device-width: 539px) { 
    /* Large screen, retina */ 
    .welcome { 
     background:#00ff00; 
     /* link to other image */ 
     background-image: url('Desktop768px1024px.jpg'); 
     background-size: 100% 100%; 
     /* hide src */ 
     height:0; 
     width:0; 

     /* just show the background */ 
     padding:768px 1024px; 
    } 
} 
+1

'dppx',並在同一個目標'px',似乎不可思議... :)你在什麼設備測試? – fiskolin

回答

0

嘗試使用這樣的規則:

@media only screen and (min-resolution: 72dpi) and (min-device-width: 539px) {}