簡體   English   中英

如何在主導航欄上更改顏色,我無法通過CSS和PHP都無法訪問顏色

[英]How to change color on my main navbar, I can't acces it throught CSS neither PHP

我正在Wordpress中創建帶有King Size主題的網站,它是主題1.4的舊版本。 所以這是主題那部分的CSS,但是我無能為力。 現在,這是我主頁上帶有該nawbar的inspect元素的代碼,因此請有人幫助我。

 iv#navContainer { top: 0; max-width: 240px; width: 25%; z-index: 3; } div#navContainer { position: fixed; } .front { z-index: 2; } .hide-for-xlarge, .show-for-large, .show-for-large-up, .hide-for-small, .hide-for-medium, .hide-for-medium-down { display: block !important; } body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 12px; direction: ltr; } * { margin: 0; padding: 0; } * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } user agent stylesheetdiv { display: block; } Inherited from body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 12px; direction: ltr; } Inherited from body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { margin: 0; padding: 0; font-size: 12px; direction: ltr; } body { background: url(../images/grid.png); font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1; position: relative; -webkit-font-smoothing: antialiased; } p, body { color: #CCCCCC; } Inherited from html { font-size: 62.5%; height: 100%; } 

在上傳主題之前,請轉到“ kingsize / images / opacity / 90 /”並更改“ menu_back.png”。

但是請記住,新圖像應具有相同的名稱和格式。(menu_back.png)

考慮到您發布代碼的方式,我發現您的代碼難以理解。 不過,這應該可以解決您的問題:

Javascript:

window.onload = function(){
window.setInterval(function(){
document.getElementById('navContainer').style.backgroundColor = '#fff';
},50);
};

請告訴我會發生什么。 如果此代碼無濟於事,我很樂意跟進。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM