フラットなボタン
- RESULT
- HTML
- CSS
- コピー
<p class="msr_btn03"> <a href="#">button01</a> </p>
- コピー
.msr_btn03 { border-radius: 3px; box-sizing: border-box; width: 230px; } .msr_btn03 a { background-color: #1B73BA; border-radius: 3px; color: #FFFFFF; font-size: 13px; display: block; padding: 13px 10px; position: relative; text-align: center; text-decoration: none; transition: 0.2s ease-in-out; -o-transition: 0.2s ease-in-out; -moz-transition: 0.2s ease-in-out; -webkit-transition: 0.2s ease-in-out; } /* 白の三角形 */ .msr_btn03 a:before { border: 4px solid transparent; border-left: 4px solid #FFFFFF; box-sizing: border-box; content: ""; display: inline-block; height: 8px; margin:0 4px 0 0; transition: 0.2s ease-in-out; -o-transition: 0.2s ease-in-out; -moz-transition: 0.2s ease-in-out; -webkit-transition: 0.2s ease-in-out; width: 4px; vertical-align:0px; } /* マウスオーバー */ .msr_btn03 a:hover { background-color: #F0F0F0; color: #1B73BA; } .msr_btn03 a:hover:before { border-left: 4px solid #1B73BA; }
検証済みブラウザ
- IE9
- IE10
- Edge
- FF
- chrome
- Safari