Day # 48: Ripple button



Buttons are one of those elements that as frontend developers we simply need to master. And while it is true that one can look for buttons that are already designed, I think that going through the process of styling them on your own makes up for a very solid learning experience.

Today’s project consists of the styling of a button that seems to have two distinct borders and backgrounds. In order to accomplish that, one could recur to the before and after pseudo elements. They allow you to insert content without having to go through the HTML document:


.container a:nth-child(1):before,

.container a:nth-child(1):after {

    background: linear-gradient(45deg, #00ccff, #0e1538, #d400d4);

}

.container a:nth-child(2):before,

.container a:nth-child(2):after {

    background: linear-gradient(45deg, #ff075b, #0e1538, #1aff22);

}


Comments

Popular posts from this blog

Day # 35: Flip Book

Day # 1: Homepage w/Introduction

Day # 8: Inspiration