home > 『Web標準の教科書』読者サポートページ > 第6章 第9節
第6章 第9節(p.421-425)
h2 {
padding: 8px;
color: white;
background-color: #699;
font-size: 1.2em;
}
h3 {
padding: 8px;
color: #699;
border-top: 1px dotted #699;
border-bottom: 1px dotted #699;
border-left: 10px solid #699;
}
h2 {
padding: 8px;
color: white;
background: #699 url(/images/h2_dogeared.gif) no-repeat top right;
font-size: 1.2em;
}
h3 {
padding-left: 25px;
color: #699;
background: url(/images/h3_icon.gif) no-repeat center left;
font-size: 1.2em;
}
h4 {
padding-left: 3px;
padding-bottom: 3px;
background: url(/images/gradation.gif) repeat-x bottom;
font-size: 1em;
}
h1 {
counter-increment: chapter;
}
h1:before {
content: counter(chapter) " ";
}
h2 {
counter-increment: section;
counter-reset: subsection;
}
h2:before {
content: counter(chapter) "." counter(section) " ";
}
h3 {
counter-increment: subsection;
}
h3:before {
content: counter(chapter) "." counter(section) "."
counter(subsection) " ";
}