CSS カウンターに問題があります。
headings
1 つのインデックスと他のインデックスの2 つのカウンターを設定しましたimages
。ただし、正しく機能するのは 1 つだけです。もう 1 つ (画像用) は、すべての画像の説明で 1 しか表示されません。ここで例を見ることができます
body {
counter-reset: figcounter;
counter-reset: head2counter;
}
.fig:before {
counter-increment: figcounter;
content: "Fig. " counter(figcounter)": ";
font-weight: bold;
}
.figreset {
counter-reset: figcounter;
}
.head2:before {
counter-increment: head2counter;
content: counter(head2counter)" ";
}
.head2reset {
counter-reset: head2counter;
}
<h1>Article title</h1>
<h2 class="head2">Services</h2>
<img src="http://www.google.com/about/company/images/company-products.png" width="200" />
<span class="fig">Google services</span>
<h2 class="head2">E-mail clients</h2>
<h2 class="head2">Others</h2>
<img src="http://4.bp.blogspot.com/-JOqxgp-ZWe0/U3BtyEQlEiI/AAAAAAAAOfg/Doq6Q2MwIKA/s1600/google-logo-874x288.png" width="200" />
<span class="fig">Google logo</span>
<br />
<img src="http://thenextweb.com/wp-content/blogs.dir/1/files/2013/02/google_chrome.png" width="200" />
<span class="fig">Chrome</span>
それを修正する方法を知っていますか?カウンターが 1 つしかない場合は、正常に機能します。で画像を個別にインデックス付けしたいheadings
。