Created
June 2, 2014 08:42
-
-
Save mcbrwr/888c55f0ad9e7d7f2d5f to your computer and use it in GitHub Desktop.
LESS overlay video play icon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.vidicon(@size) { | |
@trisize: (@size / 3); | |
position: relative; | |
z-index: 1; | |
&:before, | |
&:after { | |
content: ""; | |
opacity: .7; | |
display: block; | |
position: absolute; | |
z-index: 2; | |
top: 50%; | |
left: 50%; | |
} | |
&:before { | |
border: solid @trisize transparent; | |
border-right: none; | |
border-left-color: #fff; | |
border-left-width: (@trisize/.8); | |
margin-top: -@trisize; | |
margin-left: -(@trisize / 2); | |
} | |
&:after { | |
.border-radius(100%); | |
border: solid 5px #fff; | |
width: @size; | |
height: @size; | |
margin-top: -(@size / 2); | |
margin-left: -(@size / 2); | |
} | |
&:hover { | |
&:before, | |
&:after { | |
opacity: 1; | |
.transition(.3s); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment