JSFiddle - React, Tailwind, and code Playground
Social Icons
by Jennifer Perrin
HTML
<div class="getSocial">
<ul class="socialIcons">
<li class="twitter"><a href="#">twitter</a>
</li>
<li class="facebook"><a href="#">facebook</a>
</li>
<li class="forrst"><a href="#">forrst</a>
</li>
<li class="linkedin"><a href="#">linkedin</a>
</li>
<li class="googleplus"><a href="#">googleplus</a>
</li>
<li class="rss"><a href="#">rss</a>
</li>
</ul>
</div>
<div class="getSocial">
<ul class="socialIcons">
<li class="twitter squared"><a href="#">twitter</a>
</li>
<li class="facebook squared"><a href="#">facebook</a>
</li>
<li class="forrst squared"><a href="#">forrst</a>
</li>
<li class="linkedin squared"><a href="#">linkedin</a>
</li>
<li class="googleplus squared"><a href="#">googleplus</a>
</li>
<li class="rss squared"><a href="#">rss</a>
</li>
</ul>
</div>
<div class="getSocial">
<ul class="socialIcons">
<li class="twitter rounded"><a href="#">twitter</a>
</li>
<li class="facebook cornered"><a href="#">facebook</a>
</li>
<li class="forrst rounded"><a href="#">forrst</a>
</li>
<li class="linkedin cornered"><a href="#">linkedin</a>
</li>
<li class="googleplus rounded"><a href="#">googleplus</a>
</li>
<li class="rss cornered"><a href="#">rss</a>
</li>
</ul>
</div>
CSS
/*----------------------------
Social Icons
-----------------------------*/
.getSocial {
min-height: 40px;
padding: 0;
font-size: 0;
}
.socialIcons {
width: auto;
margin: 0;
padding: 0;
text-align: center;
overflow: hidden;
}
.socialIcons li {
display: inline-block;
margin: 2px 4px;
padding: 0;
background-image:url(http://jenniferperrin.com/images/social.png);
background-repeat: no-repeat;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.socialIcons li:hover {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
-ms-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.socialIcons li a {
display: block;
text-indent: -9999;
height: 40px;
width: 40px;
}
.squared {
border: 3px solid #f8f8f8;
}
.rounded {
border: 3px solid #f8f8f8;
border-radius: 40px;
}
.cornered {
border: 3px solid #f8f8f8;
border-radius: 14px;
}
.socialIcons li.twitter {
background-position: 0 0px;
}
.socialIcons li.twitter:hover {
background-position: 0 -40px;
}
.socialIcons li.facebook {
background-position: 0 -80px;
}
.socialIcons li.facebook:hover {
background-position: 0 -120px;
}
.socialIcons li.forrst {
background-position: 0 -160px;
}
.socialIcons li.forrst:hover {
background-position: 0 -200px;
}
.socialIcons li.linkedin {
background-position: 0 -240px;
}
.socialIcons li.linkedin:hover {
background-position: 0 -280px;
}
.socialIcons li.googleplus {
background-position: 0 -320px;
}
.socialIcons li.googleplus:hover {
background-position: 0 -360px;
}
.socialIcons li.rss {
background-position: 0 -400px;
}
.socialIcons li.rss:hover {
background-position: 0 -440px;
}