[英]logo not changing in mobile devies in wordpress site
我有一個問題,當我從移動設備查看我的網站時,它顯示了主題的默認徽標,我在主題選項中更新了移動徽標,但徽標也沒有改變..
那么有什么方法可以在主題編碼中找到默認徽標,然后將其替換為我在移動設備中的自定義徽標......或任何其他方式!
我試圖通過以下代碼隱藏默認徽標並使用移動設備的自定義徽標:-
@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;
}
}
上面的代碼不起作用..
在桌面設備中,徽標工作正常,僅在 android 設備中出現問題。
Wordpress 確實會產生很多問題。 我建議清除緩存以正確更新網站。 如果您使用 wordpress 和任何頁面構建器,您可以在 Elementor 主題構建器中創建 header,然后您可以從響應選項卡中更改您想在移動設備中而不是在桌面中顯示的任何內容。
嘗試這個:
@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.