【问题标题】:Responsive media query not working in wordpress响应式媒体查询在 wordpress 中不起作用
【发布时间】:2014-11-12 17:57:57
【问题描述】:

我正在使用 Media Queries 在 wordpress 的论文框架中给出响应式响应。但它不起作用。我也从这些 stackoverflow 答案中获得帮助,但仍然无法正常工作。

Responsive site works on desktop but not mobile

responsive media query not working

当我在http://www.responsinator.com/?url=http%3A%2F%2Fwww.lvticketattorney.com%2F 检查此查询时,它正在工作。但是当我在移动设备上查看它时它不起作用。

媒体查询

@media (max-width: 569px) {
    .menu a{font-size:10px;}
    .list-left, .list-right{ width:100%; float:left !important;}
    .custom #header{ background-size:95%;}
}
@media (max-width: 415px) {
    .menu{ border:0 !important;}
    .menu li{ width:95%; border-bottom:solid 2px #fff;}
    .menu .current a{ border:solid 1px #000;}
    #content_box #content{ width:100%;}
    #content_box #sidebars{ width:100%;}
    .teaser_right, .teaser{ float:left; width:90%;}
    .gform_wrapper{ width:100%;}
    #attachment_661{ width:100% !important;}
    .gform_footer{ width:50%; }
    }
@media (max-width: 385px) {
    .format_text h1{ font-size:18px;}
    .custom #header{ height:90px;} 
    #box{ width:95%;}
    #box img{ height:auto;}
    .menu{ margin-top:-10px; border-top:solid 1px #000;}
    .format_text p span{ font-size:14px !important;}
    .headline_area h1, .headline_area h2, #archive_intro h1{ font-size:18px;}
    .wp-image-167, .wp-image-207{ width:100px;}
    }

【问题讨论】:

  • 哪个移动设备?有时在响应中,您必须针对特定类型的设备(例如 ios 与 android)在这里和那里做一些小技巧

标签: css wordpress frameworks responsive-design media-queries


【解决方案1】:

我使用这个媒体查询@media only screen and (max-width: 740px) { ---- Style--- }。现在它正在工作。 only screen and 不见了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-08-12
    • 1970-01-01
    • 2018-04-22
    • 1970-01-01
    • 2012-09-10
    • 2012-10-11
    • 2017-02-20
    • 1970-01-01
    相关资源
    最近更新 更多