简体   繁体   English

wordpress 网站的移动设备中的徽标没有变化

[英]logo not changing in mobile devies in wordpress site

I have a problem, that when i view my site from mobile devices, it shows the default logo of the theme, I have updated the mobile logo in theme options, but also the logo is not changing..我有一个问题,当我从移动设备查看我的网站时,它显示了主题的默认徽标,我在主题选项中更新了移动徽标,但徽标也没有改变..

So is there any way to find the default logo in theme coding and then replace it with my custom logo in mobile devices...or any other way!那么有什么方法可以在主题编码中找到默认徽标,然后将其替换为我在移动设备中的自定义徽标......或任何其他方式!

I tried to hide the deafult logo and use custom logo for mobile devices by this code:-我试图通过以下代码隐藏默认徽标并使用移动设备的自定义徽标:-

@media (max-width: 480px) {
    .site-title a {
        background: transparent url("http://logo.png") no-repeat scroll 0 0 !important;
        overflow: auto;
    }
}

}

@media (min-width: 480px) and (max-width: 768px) {
    .site-title a {
        background: transparent url("http://logo.png") no-repeat scroll 0 0 !important;
        display: block;
    }
}

The above code does not work..上面的代码不起作用..

In desktop devices the logo is working fine, only problem with in android devices..在桌面设备中,徽标工作正常,仅在 android 设备中出现问题。

Wordpress does create a lot of problems. Wordpress 确实会产生很多问题。 I would suggest clearing cache for a proper update of the website.我建议清除缓存以正确更新网站。 If you are using wordpress and any page builders, you can create the header in your Elementor Theme Builder and in there you can change from the Responsive tab anything you want to show in the Mobile and not in the Desktop.如果您使用 wordpress 和任何页面构建器,您可以在 Elementor 主题构建器中创建 header,然后您可以从响应选项卡中更改您想在移动设备中而不是在桌面中显示的任何内容。

Try This:尝试这个:

 @media (max-width: 480px) {
        .site-logo  {
            background: transparent url("http://logo.png") no-repeat scroll 0 0 !important;
        background-size: cover;
          padding: 0px;
          margin: 0px;
          width: 150px;
          height: 50px;
        }
    .site-logo img
    {
    display:none;
    }
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM