我已经为几乎所有存在的设备编写了媒体查询,并且它们在所有最新的移动设备以及各种基于Web的模拟器上都非常出色。然而,对于像iPhone 5s和三星Galaxy 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);
}
}