HTML
CSS
JS
Run
Hover me!
Hover me!
Hover me!
@import url(https://fonts.googleapis.com/css?family=Open+Sans); body{ background-color: #000; text-align: center; min-height: 270px; display: flex; align-items: center; justify-content: center; font-family: "Open Sans"; } .btn-border { position: relative; padding: 20px 30px; border: none; background-color: transparent; cursor: pointer; outline: none; font-size: 18px; margin: 20px; text-decoration: none; } .btn-border.design1 { color: #fff; } .btn-border.design1.design1::after, .btn-border.design1.design1::before { content: ""; display: block; position: absolute; width: 20%; height: 30%; border: 2px solid; transition: all 0.6s ease; border-radius: 2px; } .btn-border.design1.design1::after { bottom: 0; right: 0; border-top-color: transparent; border-left-color: transparent; border-bottom-color: #fff; border-right-color: #fff; } .btn-border.design1.design1::before { top: 0; left: 0; border-bottom-color: transparent; border-right-color: transparent; border-top-color: #fff; border-left-color: #fff; } .btn-border.design1.design1:hover:after, .btn-border.design1.design1:hover:before { width: calc(100% - 3px); height: calc(100% - 4px); } .btn-border.design2 { color: #fff; } .btn-border.design2.design2::after, .btn-border.design2.design2::before { content: ""; display: block; position: absolute; width: 20%; height: 30%; border: 2px solid; transition: all 0.6s ease; border-radius: 2px; } .btn-border.design2.design2::after { bottom: 0; right: 0; border-top-color: transparent; border-left-color: transparent; border-bottom-color: #fff; border-right-color: #fff; } .btn-border.design2.design2::before { top: 0; left: 0; border-bottom-color: transparent; border-right-color: transparent; border-top-color: #fff; border-left-color: #fff; } .btn-border.design2.design2:hover:after, .btn-border.design2.design2:hover:before { border-bottom-color: #fff; border-right-color: #fff; border-top-color: #fff; border-left-color: #fff; width: 105%; height: 110%; } .btn-border.design3 { color: #fff; } .btn-border.design3::before { content: ""; display: block; position: absolute; height: 2px; width: 0; right: 0; background-color: #fff; transition: width 0.3s ease-in-out; } .btn-border.design3::before { top: 0; } .btn-border.design3:hover::before { width: 50%; } .btn-border.design3::after { content: ""; display: block; position: absolute; height: 2px; width: 0; left: 0; background-color: #fff; transition: width 0.3s ease-in-out; } .btn-border.design3::after { bottom: 0; } .btn-border.design3:hover::after { width: 50%; }
Press Ctrl+Space Key for Auto complete and Intelli Sense