div内にヘッダーがある場合、目次が機能しない?

It depends on what you try to achieve with your other HTML content.

I crosspost a potential workaround: TOC doesn't work when wrapped with HTML tags - #2 by Canapin

「いいね!」 2