0

@media 标签有助于定义屏幕的缩放级别。例如,

@media(min-width:1165px) and (max-width:1366px){
    .subheader
    {
        position:fixed;
        top:8.5%;
        left:0%;
        background-color:;
    }
    .notices
    {
        margin-top:8%;
        margin-left:22%;
    }
}

当缩放级别约为 125% 时,执行 1165px 到 1366px 的范围。所以谁能告诉我所有缩放级别的确切范围,例如 25%、33%、50%、75%、90%、100%、125%、150%、175%、200%、250%、300%、 400% 和 500%。我试着用谷歌搜索它,但找不到任何有用的东西。

4

1 回答 1

0

我在 chrome 浏览器上进行了实验,这就是我想出的,

@media (min-width:273px)
{
    .subheader
    {
        background-color:red;
    }
}

@media (min-width:274px) and (max-width:341px)
{
    .subheader
    {
        background-color:orange;
    }
}

@media (min-width:342px) and (max-width:455px)
{
    .subheader
    {
        background-color:green;
    }
}

@media (min-width:456px) and (max-width:546px)
{
    .subheader
    {
        background-color:yellow;
    }
}

@media (min-width:547px) and (max-width:683px)
{
    .subheader
    {
        background-color:grey;
    }
}

@media (min-width:684px) and (max-width:781px)
{
    .subheader
    {
        background-color:white;
    }
}

@media (min-width:782px) and (max-width:911px)
{
    .subheader
    {
        background-color:black;
    }
}

@media (min-width:912px) and (max-width:1093px)
{
    .subheader
    {
        background-color:aqua;
    }
}

@media (min-width:1094) and (max-width:1242px)
{
    .subheader
    {
        background-color:tan;
    }
}

@media (min-width:1243px) and (max-width:1366px)
{
    .subheader
    {
        background-color:blue;
    }
}

@media (min-width:1367px) and (max-width:1517px)
{
    .subheader
    {
        background-color:violet;
    }
}

@media (min-width:1518px) and (max-width:1821px)
{
    .subheader
    {
        background-color:indigo;
    }
}

@media (min-width:1822px) and (max-width:2051px)
{
    .subheader
    {
        background-color:purple;
    }
}

@media (min-width:2052px) and (max-width:2732px)
{
    .subheader
    {
        background-color:magenta;
    }
}

@media (min-width:2733px) and (max-width:4102px)
{
    .subheader
    {
        background-color:azure;
    }
}

@media (min-width:4103px) and (max-width:5464px)
{
    .subheader
    {
        background-color:brown;
    }
}

如问题中所述,范围从 25% 到 500%

于 2013-11-06T17:13:00.820 回答