【问题标题】:css for mobile devices how to make '@media all' work on wordpress child theme用于移动设备的 css 如何使“@media all”在 wordpress 子主题上工作
【发布时间】:2014-01-12 20:33:29
【问题描述】:

我在我的 wordpress 子主题中有此代码(两者都单独工作),我试图让顶部代码加载到普通屏幕上,而底部两个代码加载到较小的屏幕(移动设备)上。

@media all 命令似乎没有做任何事情,我做错了什么吗?有没有其他或更好的方法来做到这一点?

谢谢!

#tab_slide {
left: 0px;
height: auto !important; 
width: 25%;
}


@media all (max-width: 1200px) {
#tab_slide {
left: 0px;
height: auto !important; 
width: 50% !important;
}
}

@media all (max-width: 1200px) {
#tab_slide_include {
padding: 0px;
}
}

【问题讨论】:

    标签: css wordpress mobile resize responsive-design


    【解决方案1】:

    你需要and:

    @media all and (max-width: 1200px)
    

    Demo

    【讨论】:

    • 是的,就是这样,非常感谢,我是新手。希望你的回答能帮助像我一样刚开始的人。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-03
    • 2020-07-10
    • 2016-04-23
    • 1970-01-01
    相关资源
    最近更新 更多