Un petit code sympa pour créer des buttons full CSS3:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | <a class="btn color1">Button css</a> /* Structure du bouton - (Shadow - transition - border radius) */ .btn { color: #FFF; border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 1px rgba(0, 0, 0, 0.2); padding: 8px 13px; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); transition-duration: 0.6s; -moz-transition-duration: 0.6s; -webkit-transition-duration: 0.6s; } .btn:hover { cursor: pointer; text-decoration: none; } /* Couleur du bouton - Color 1 - purple */ .color1 { background: #b8396d; border: solid 1px #9D2053; } .color1:hover { background: #9D2053; border: solid 1px #7a0c39; } |