Leo replied
Oh I figured it out , thx
I have created a css for the article H2 style ,but after typing this , it makes my menu fonts become small , how to make the code not influence the menu?
/* 初始化計數器 */
body { counter-reset: h2counter; }
/* 為每個 h2 標題遞增計數器 */
h2.wp-block-heading { counter-increment: h2counter;
}
/* 在 h2 標題前顯示計數器 */
h2.wp-block-heading::before { content: counter(h2counter) ' '; display: inline-block; font-size: 1em; margin-right: 0.6em; width: 1.6em; line-height: 1.6em; text-align: center; border-radius: 10%; color: #FFF; background-color: rgb(23, 42, 136); /* Navy Blue */
}
/* 添加底線給 h2 標題 */
h2.wp-block-heading { border-bottom: 2px solid rgb(23, 42, 136); /* Navy Blue */ padding-bottom: 5px; /* 調整底線和文字間距 */
Want to join this conversation or access attachments? Sign in first.
Open your ticket archive, review validated licenses, and continue product support conversations from one customer portal.