Lütfen birisi bana sıfırlama sayacı alt birimine uygulanmadığı halde neden '1' aldığımı açıklayabilir.Yani 1.1 yerine 1.2, 1.2, 1.3 almamalıyım 1.1.1.1 Aynı h1 etiketi altında tüm h2 etiketi için? Ben CSS öğrenmede yeni başlayan biriyim ve herhangi biri açıklayabiliyorsa bana çok yardımcı olacaktır.Şimdiden teşekkürler. kodudur:CSS Sayaç artışı ve karşıdan sıfırlama
<!DOCTYPE html>
<html>
<head>
<style>
body {
counter-reset: section;
}
h1 {
counter-reset: section;
}
h1:before {
counter-increment: section;
content: "Section " counter(section) ". ";
}
h2:before {
counter-increment: subsection;
content: counter(section) "." counter(subsection) " ";
}
</style>
</head>
<body>
<p><b>Note:</b> IE8 supports these properties only if a !DOCTYPE is specified.</p>
<h1>HTML tutorials</h1>
<h2>HTML Tutorial</h2>
<h2>XHTML Tutorial</h2>
<h2>CSS Tutorial</h2>
<h1>Scripting tutorials</h1>
<h2>JavaScript</h2>
<h2>VBScript</h2>
<h1>XML tutorials</h1>
<h2>XML</h2>
<h2>XSL</h2>
</body>
</html>
Çıktı:
teşekkür ama aslında ben neler olduğunu öğrenmek istedi h1 yazınız {counter-reset: section} – SFar