2015-09-23 117 views
-1

所以我想讓我的網站響應,但是當我的目標屏幕大於1600px的CSS不起作用。我的css代碼中是否有任何錯字?謝謝。媒體查詢CSS - 目標大屏幕

@media (max-width:900px) and (min-width:600px) { 
    ul.news li { 
     width: 100%; 
     margin-top: 3px; 
    } 

} 


@media (max-width:1250px) and (min-width:900px) { 
    ul.news li { 
     width: 100%; 
     margin-top: 3px; 
    } 

} 

/* THIS ONE IS NOT WORKING */ 
@media only screen and (min-width: 1600px) and (max-width: 2600px) { 

    ul.news li { 
     width: 100%!important; 
     color: red!important; 
    } 

} 
+0

https://responsivedesign.is/develop/browser-feature-support/media-queries-for-common-device-breakpoints –

+1

您發佈的作品時,我把它變成活生生的例子代碼:http://codepen.io/marceloa/pen/OyRXyZ在1600px和2600px之間,li是紅色的。 – Marcelo

回答

-1
You can refer to this Media Query and write your css in this media query dimensions 

/*=====Media Query Css Start======*/ 
@media all and (max-width:1920px){ 
} 
@media all and (max-width:1600px){ 
} 
@media all and (max-width:1366px){ 
} 
@media all and (max-width:1280px){ 
} 
@media all and (max-width:1024px){ 
} 
@media all and (max-width:960px){ 
} 
@media screen and (max-width:767px){ 
} 
@media screen and (max-width:480px){ 
} 
/*=====Media Query Css End======*/