Another question. I added extra div to the post. Now it looks like this:
<div data-theme-toc="true"> </div>
<div data-theme-profile="manual">
## Chapter 1
## Chapter 2
</div>
But the TOC is not visible in this case. How can it be fixed?
Another question. I added extra div to the post. Now it looks like this:
<div data-theme-toc="true"> </div>
<div data-theme-profile="manual">
## Chapter 1
## Chapter 2
</div>
But the TOC is not visible in this case. How can it be fixed?
目的はわかりませんが、いくつかの方法でタイトルをターゲットにできます。
HTMLのタイトルタグとdata-attributeを使用します。たとえば、[data-header-1]をCSSでターゲットできるように、<h1>Chapter 1</h1>のようにします。
data-attributeを持つ空のdivを挿入して、後続の要素をターゲットにできます。たとえば、2番目のタイトルの後に<div></div>を配置し、このCSSを追加します。
[data-next-titles] ~ .d-toc-post-heading {
color: pink;
}
これにより、次のようになります。
したがって、実際には目標によって異なります。
このガイドがお役に立てば幸いです: Customize posts' contents with your own styles
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.