我已经为几乎所有存在的设备编写了媒体查询,它们在所有最新的移动设备以及各种基于 Web 的模拟器上都非常好,设备方面。然而,对于一些设备,如 iPhone 5s 和三星 Galaxy Trend,一些元素的尺寸显得有点小。同时,对于与 Trend 和 5s 具有相同文档宽度的少数设备而言,问题并不存在。这是我的媒体查询:
@media screen and (min-width:1051px) and (max-width:1111px)
{
.logo
{
overflow: hidden;
width: 65%;
}
.logo img {
left: -13%;
position: relative;
text-align: left;
width: 100%;
}
}
@media screen and (min-width:1026px) and (max-width:1050px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 30px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:1025px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 30px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:1024px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 30px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:980px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 30px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:900px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:853px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:800px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:768px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:736px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:700px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:667px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:640px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.3);
}
}
@media screen and (max-width:603px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}
@media screen and (max-width:568px)
{
.logo
{
overflow: hidden;
width: 100%;
}
.logo img
{
left: 0;
margin-bottom: 20px;
margin-top: 20px;
position: unset;
transform: scale(1.4);
}
}