Created
August 6, 2013 23:02
-
-
Save leecrossley/6169629 to your computer and use it in GitHub Desktop.
A CodePen by Lee Crossley. Social Icons with Hover - Using LESS and FontAwesome
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet"/> | |
</head> | |
<body class="wrapper"> | |
<ul> | |
<li class="facebook"> | |
<a href="https://www.facebook.com/lee.crossley" target="_blank" class="icon"><i class="icon-facebook"></i></a> | |
</li> | |
<li class="twitter"> | |
<a href="https://twitter.com/lee_crossley" target="_blank" class="icon"><i class="icon-twitter"></i></a> | |
</li> | |
<li class="github"> | |
<a href="https://github.com/leecrossley" target="_blank" class="icon"><i class="icon-github"></i></a> | |
</li> | |
<li class="google-plus"> | |
<a href="https://plus.google.com/100605644656941447412?rel=author" target="_blank" class="icon"><i class="icon-google-plus"></i></a> | |
</li> | |
<li class="linkedin"> | |
<a href="http://uk.linkedin.com/in/leecrossley/" target="_blank" class="icon"><i class="icon-linkedin"></i></a> | |
</li> | |
</ul> | |
</body> | |
</html> | |
This file contains 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
.wrapper { | |
padding: 0; | |
margin: 0; | |
-webkit-backface-visibility: hidden; | |
width: 270px; | |
} | |
ul { | |
padding: 0; | |
margin: 0; | |
list-style-type: none; | |
li { | |
float: left; | |
width: 20%; | |
&.facebook { | |
background-color: #305c99; | |
} | |
&.twitter { | |
background-color: #2EABF3; | |
} | |
&.github { | |
background-color: #bdc3c7; | |
} | |
&.google-plus { | |
background-color: #d24228; | |
} | |
&.linkedin { | |
background-color: #007bb6; | |
} | |
} | |
} | |
.icon { | |
background-color: rgba(0,0,0,0.2); | |
margin: 10px auto; | |
display: block; | |
width: 35px; | |
height: 35px; | |
text-align: center; | |
text-decoration: none; | |
line-height: 36px; | |
color: #fff; | |
font-size: 22px; | |
border-radius: 50%; | |
box-shadow: none; | |
-webkit-transition: all .2s ease; | |
transition: all .2s ease; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
&:hover { | |
box-shadow: 0px 0px 0px 2px #fff; | |
-webkit-transform: scale(1.2); | |
transform: scale(1.2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment