我需要一份我应编写的桌面和移动分辨率列表。
我正在制作一个包含no-scroll
和overflow: hidden;
的网页因此我需要调整每个desktop resolution
和mobile resolution
的网页,所以我只需要一个列表,如果可能请
答案 0 :(得分:2)
您可以CSS Tricks参考Media Queries for Standard Devices。这包括纵向和横向布局。
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/* Styles */
}
/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) {
/* Styles */
}
/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px) {
/* Styles */
}
/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
/* Styles */
}
/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
/* Styles */
}
/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* Styles */
}
/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}
/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}
还有许多相同的在线摘录:
答案 1 :(得分:0)
通过@media查询使用响应式CSS ..像这样
@media only screen and (max-width: 320px) {
.container {width: 100%;}
.dropdown {height:35px;}
.dropdown p {line-height:35px;}
.header {height:40px; background:url(images/logoplastik.png) no-repeat 10px 90% left center ; }
}
@media only screen and (min-width: 321px) and (max-width: 480px) {
.container {width: 100%; }
.dropdown {height:35px;}
.dropdown p {line-height:35px;}
.header {height:40px; padding-left:10px;}
}