マテリアルな見出し
- RESULT
- HTML
- CSS
Heading01
Heading02
Heading03
Heading04
- コピー
<h1 class="msr_h103">Heading01</h1> <h2 class="msr_h203">Heading02</h2> <h3 class="msr_h303">Heading03</h3> <h4 class="msr_h403">Heading04</h4>
- コピー
.msr_h103 { background: #1B73BA; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; box-sizing: border-box; color: #fff; font-size: 30px; margin: 0 0 20px; padding: 5px 20px 5px 25px; position: relative; width: 100%; } /* h1白の三角形 */ .msr_h103:before { border-bottom: 10px solid transparent; border-left: 10px solid #FFF; border-right: 10px solid transparent; border-top: 10px solid transparent; content: " "; display: block; left: 0; margin: -10px 0 0 0; position: absolute; top: 50%; } .msr_h203 { background: #F8F8F8; border-top: 2px solid #1B73BA; box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 2px 0px; box-sizing: border-box; color: #1B73BA; font-size: 20px; font-weight: bold; margin: 0 0 20px; padding: 10px 15px 10px; } .msr_h303 { border-bottom: 2px solid #1B73BA; font-size: 18px; font-weight: bold; margin: 0 0 20px; padding-bottom: 5px; } .msr_h403 { border-left: 2px solid #1B73BA; font-size: 16px; font-weight: bold; margin: 0 0 20px; padding-left: 5px; }
検証済みブラウザ
- IE9
- IE10
- Edge
- FF
- chrome
- Safari