Php Wordpress侧边栏在chrome上显示inspect,但在手机上不显示
我遇到了一个问题。 我为一个网站定制了一个侧边栏。这包括搜索、类别列表和定价选项 正如你在这里看到的,当你在谷歌浏览器上查看时,它完美地展示了这一点。 但当我在手机上打开同一页时,它就不再显示了 此侧边栏应使用以下自定义css显示:Php Wordpress侧边栏在chrome上显示inspect,但在手机上不显示,php,css,wordpress,sidebar,Php,Css,Wordpress,Sidebar,我遇到了一个问题。 我为一个网站定制了一个侧边栏。这包括搜索、类别列表和定价选项 正如你在这里看到的,当你在谷歌浏览器上查看时,它完美地展示了这一点。 但当我在手机上打开同一页时,它就不再显示了 此侧边栏应使用以下自定义css显示: @media only screen and (max-width: 759px) { #sidebar { position: absolute !important; top: -9999px !import
@media only screen and (max-width: 759px) {
#sidebar {
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
}
@media only screen and (max-width: 759px) {
#sidebar-3 {
display:block;
}
}
@media only screen and (min-width: 767px) {
#woocommerce_product_search_widget-8 {
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
}
@media only screen and (min-width: 767px) {
#woocommerce_price_filter-10 {
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
}
@media only screen and (min-width: 767px) {
#woocommerce_product_categories-4 {
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
}
这基本上确保了在桌面上,它在左侧有侧边栏(侧边栏)。它隐藏在手机/平板电脑等设备上。在手机上,它的顶部有侧边栏3,隐藏在桌面上。
正如您所看到的,我甚至尝试通过添加display:block来显示边栏3。可惜没有用
我在另外两个网站上使用了相同的代码,它们工作得非常好
有人知道这里可能发生了什么吗?