<!DOCTYPE html> <html> <head> <style> .socialLinks{ position:relative; left:0px; } .socialLinks ul{ list-style-type:none; width:0px; padding:23px; background-color:red; position:absolute; } .socialLinks ul li{ float:left; } .socialLinks ul li a{ display:block; padding:23px; text-decoration:none; background-color:rgba(200,200,200,1); position:absolute; top:0px; left:0px; border-radius:7px; background-position:center; } .socialLinks ul li a.li{ background-image:url('share-icon.png'); } .socialLinks ul li a.go{ background-image:url('google+-icon.png'); } .socialLinks ul li a.fa{ background-image:url('facebook-icon.png'); } .socialLinks ul li a.tw{ background-image:url('twitter-icon.png'); } .socialLinks ul:hover{ width:200px; } .socialLinks ul:hover li a.go{ left:60px; animation:go 0.7s 1; } .socialLinks ul:hover li a.fa{ left:120px; animation:fa 0.7s 1; } .socialLinks ul:hover li a.tw{ left:180px; animation:tw 0.7s 1; } @keyframes go{ 0%{ left:0px; } 100%{ left:60px; } } @keyframes fa{ 0%{ left:0px; } 100%{ left:120px; } } @keyframes tw{ 0%{ left:0px; } 100%{ left:180px; } } </style> </head> <body> <div class="socialLinks"> <ul> <li><a href="" class="go"></a></li> <li><a href="" class="fa"></a></li> <li><a href="" class="tw"></a></li> <li><a href="" class="li"></a></li> </ul> </div> </body> </html>
Run
×
Share