感謝您的任何幫助!關于這個 Wordpress 網站:

uj5u.com熱心網友回復:
如果您有添加自定義 css 的方法,您可以找到橫幅的類,然后執行
.banner-class {
--primary-color: red;
}
或者如果橫幅沒有類
bannerElement {
--primary-color: red;
}
uj5u.com熱心網友回復:
我查看了網站上的源代碼。當我應用如下所示的更改時,我將背景顏色更改為紅色:
.banner .caption {
width: 485px;
margin: 0 0 0 auto;
padding: 222px 40px 222px;
/* You can remove the following style according to the situation. */
background: rgba(var(--primary-color), 1);
/* The following style makes the background color red. */
background-color: red !important;
}
上面修改的預定義樣式在檔案style.css 中可用。要應用更改,請打開style.css檔案并更改上述.banner .caption樣式。

uj5u.com熱心網友回復:
重要的是要注意 --primary-color 和類似的 CSS 變數不是在它們的“完整”CSS 形式中定義的(例如 rgb(255, 0, 0) 對應于 CSS 紅色),而是 RGB 設定串列用來。例如 --primary-color: 253, 89, 88
在 Wordpress 中,您可以通過管理選單中的外觀選項設定自定義 css。
要將背景設定為“適當的”紅色(但這不會影響 --primary-color 的其他一些用途),請使用:
.container {
--primary-color: 255, 0, 0;
}
注意:您可能需要在選擇器中更加具體,以確保僅更改容器的特定實體。
如果要為站點更改它,請改用 :root。
注意 - 通常明智的做法是不要更改主題的實際檔案。使用 WP 方式來代替。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/402834.html
標籤:
