18910140161

HTML-@media(Max-width:1200px)直到1183px才响应-堆栈溢出

顺晟科技

2022-10-18 13:34:47

69

正如标题所说,Max-Width无法正常工作。你可以在下面的图片上看到我的意思。我只发布了它的一个部分,但它不能在整个网站上工作。它不仅适用于1200px.我使用的是$LG,它是992px,但它应用于981px的@media代码,与其他值相同。CSS是用SCSS编写的。

截图1

屏幕截图2

 .button-holder //button on the left css
    {
        display:flex;
        flex-direction: row;
        align-items: center;
        text-align: center;
        width:300px;
        height:60px;
        //width:30%;
        background-color:$primary-light;
        font-weight: 600;
        border:3px solid $primary;
        transition: all 0.5s;
        a
        {
            width:100%;
            color:black;
        }

    }
    .line // line in middle
    {
        margin-left: 10px;
        border:1px solid $primary-light;
    }
    .square // square on image
    {
        height:15px;
        width:15px;
        background-color:$primary;
        transition: all 0.5s;
    }
.lower-back // 2nd last button from below
    {
        display: flex;
        flex-direction: row;
        align-items: center;
        width:100%;
        margin-top:30px;
        .line
        {
            width:530px;
            @media(max-width:1200px)
            {
                width:150px;
            }
        }

    }

我没有在该部分的任何其他地方使用@Media.

谢谢你的帮助。


顺晟科技:

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航