目前我正在使用 Wordpress 上的開放時間插件(https://wordpress.org/plugins/wp-opening-hours/),我對簡碼有疑問。僅供參考:我正在使用 Wordpress 和 Elementor。
目前可以在我的網站上看到以下內容(文本為荷蘭語):https ://imgur.com/a/95pauul
已使用以下代碼:
[op-overview set_id=".." show_closed_days="true" show_description="false" highlight="day" compress="true" include_io="true" include_holidays="true" template="list" caption_closed="Gesloten" style="color:#ffffff;"]
我想將當天的第一個字母大寫,并在左側概述開放時間(數字),因此這與日期一致。但是,我不知道如何撰寫代碼,盡管這似乎是一項非常容易的任務。有人能幫我嗎?先感謝您。
uj5u.com熱心網友回復:
編輯:這是插件輸出的他網站的 HTML:
<dl class="op-list op-list-overview">
<dt class="op-cell op-cell-heading highlighted">maandag – vrijdag</dt>
<dd class="op-cell op-cell-periods highlighted"><span class="op-period-time ">08:00 – 17:30</span></dd>
<dt class="op-cell op-cell-heading ">zaterdag</dt>
<dd class="op-cell op-cell-periods "><span class="op-period-time ">08:30 – 12:00</span></dd>
<dt class="op-cell op-cell-heading ">zondag</dt>
<dd class="op-cell op-cell-periods "><span class="op-closed">Gesloten</span></dd>
</dl>
這是用于完成更改的自定義 css:
.op-list-overview .op-cell.op-cell-heading {
text-transform: capitalize; /*Capitalizes the first letter of every word in the heading cell with the days in it.*/
}
.op-list-overview .op-cell.op-cell-periods {
margin-left: 0; /*Clears the left margin on the hours*/
margin-bottom: 5px; /*for space beneath the hours*/
}
沒有看到您的網站,我無法判斷這些是否有效。
要將自定義 CSS 添加到 WordPress,請登錄儀表板,然后在左側選單中單擊“外觀”,然后單擊“自定義”。在定制器中,左側底部的選項應該是“附加 CSS”。這將為您提供一個文本框,您可以在其中添加我上面提供的 CSS 之類的代碼。請小心添加您不認識的人(如我)不理解的代碼。如果需要,請在我的代碼中搜索一些內容,以確保您知道它是什么以及它在做什么。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/433819.html
