/ Published in: CSS
A quick template I made for making anchors look like nice big buttons.
Expand |
Embed | Plain Text
/* <a class="textButton" href="#"><span class="tbSpan">textButton</span></a> */ .textButton, .tbSpan { display: block; width: 200px; -moz-border-radius: 30px; border-radius: 30px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .textButton { margin-bottom: 10px; text-align: center; text-decoration: none; background: aqua; } .tbSpan { padding: 15px 0; color: #000; /* firefox */ background: -moz-linear-gradient(top, hsla(0,0%,100%,.4) 0%, hsla(0,0%,100%,.0) 50%, hsla(0,0%,0%,.2) 100%); /* webkit */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,hsla(0,0%,100%,.4)), color-stop(50%,hsla(0,0%,100%,.0)), color-stop(100%,hsla(0,0%,0%,.2))); } .tbSpan:hover { /* firefox */ background: -moz-linear-gradient(top, hsla(0,0%,0%,.4) 0%, hsla(0,0%,100%,.0) 50%, hsla(0,0%,100%,.4) 50%); /* webkit */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,hsla(0,0%,0%,.3)), color-stop(50%,hsla(0,0%,100%,.0)), color-stop(100%,hsla(0,0%,100%,.4))); }
You need to login to post a comment.
