Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Forked from anonymous/Button .markdown
Created November 8, 2015 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeMyUI/7d453b1fc2ceea12c19f to your computer and use it in GitHub Desktop.
Save CodeMyUI/7d453b1fc2ceea12c19f to your computer and use it in GitHub Desktop.
Button
div.container
div.row
div.mt
a.btn.btn-custom.style1
span.r.r1
span.r.r2
| Hellow World
span.r.r3
span.r.r4
a.btn.btn-custom.style2
span.r.r1
span.r.r2
| Hellow World
span.r.r3
span.r.r4
@primary: #3598db;
@p: -4px;
@p-back: 0;
body{
background: #e74c3c;
}
.trans{
-webkit-transition: all .5s ease-out ;
-moz-transition: all .5s ease-out ;
-o-transition: all .55s ease-out ;
transition: all .5s ease-out ;
}
.mt{
margin-top: 100px;
text-align: center;
}
.btn{
margin-right: 30px;
}
.btn-custom{
border: 1px solid #212121;
border-radius: 0;
padding: 20px 40px;
font-size: 20px;
color: #212121;
position: relative;
.trans;
}
.r{
position: absolute;
width: 8px;
height: 8px;
display: inline-block;
background: #212121;
.trans;
}
.r1{
top: @p;
left: @p;
}
.r2{
bottom: @p;
left: @p;
}
.r3{
top: @p;
right: @p;
}
.r4{
bottom: @p;
right: @p;
}
//hover styles
.btn-custom.style1{
&:hover{
background: @primary;
color: #fff;
border-color: #fff;
.r{
background: #fff;
}
.r1{
top: @p-back;
left: @p-back;
}
.r2{
bottom: @p-back;
left: @p-back;
}
.r3{
top: @p-back;
right: @p-back;
}
.r4{
bottom: @p-back;
right: @p-back;
}
}
}
//this one is unfinished
.btn-custom.style2{
&:hover{
background: @primary;
color: #fff;
border-color: #fff;
.r1{
top: auto;
bottom: @p;
left: @p;
background: red !important;
}
.r2{
bottom: auto;
top: @p;
left: @p;
}
}
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment