【问题标题】:Media does not find in css在 css 中找不到媒体
【发布时间】:2015-10-05 18:40:10
【问题描述】:

我正在处理 css。我在 css 中使用了@media,但出现错误,即当前上下文中不存在媒体。我该如何解决这个问题?

@media ( max-width : 585px ) {

        .wizard {
            width: 90%;
            height: auto !important;
        }

        span.round-tab {
            font-size: 16px;
            width: 50px;
            height: 50px;
            line-height: 50px;
        }

        .wizard .nav-tabs > li a {
            width: 50px;
            height: 50px;
            line-height: 50px;
        }

        .wizard li.active:after {
            content: " ";
            position: absolute;
            left: 35%;
        }
    }

【问题讨论】:

  • 你能指定你在哪里看到这个错误吗?
  • 请提供您遇到此错误的代码示例,以便我们进行调试。

标签: css


【解决方案1】:

尝试替换这一行:

@media (max-width:585px) {

用这个:

@media only screen and (max-width:585px) {

【讨论】:

    猜你喜欢
    • 2014-02-10
    • 2014-06-12
    • 1970-01-01
    • 2020-02-15
    • 2021-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多