Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
3d Social Media Icons
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
Button submission checks
Checks will appear after the preview updates.
Buttons only: no full pages, forms, cards or navigation. Put scripts in the JavaScript tab. Tailwind uses utilities from HTML and JavaScript; use complete class names. Custom CSS supports plain CSS, without @apply, imports or plugins.
Accessibility quick check
Waiting for the rendered preview…
Try Tab, Enter and Space in the preview. Check the focus ring, hover and disabled states, then enable Reduce motion. These checks are guidance, not an accessibility certification.
Explore freely here. Remix to publish your version with credit to the creator.
About 3d Social Media Icons
3d Social Media Icons is an animated CSS button by @0xabdulkhalid. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, Icon, Social, 3D
- Using this example
- Copy the HTML or download index.html, style.css and app.js. Test keyboard focus, motion and contrast in your own project.
Usage, Tailwind and licensing questions
Read the source files
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3d Social Media Icons</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="./styles.css">
<script src="https://kit.fontawesome.com/a9b2082fbc.js" crossorigin="anonymous"></script>
</head>
<body translate="no">
<ul><li><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span class="fa fa-codepen"></span>
</a></li>
<li><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span class="fa fa-github"></span>
</a></li>
<li><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span class="fa fa-instagram"></span>
</a></li>
<li><a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span class="fa fa-twitter"></span>
</a></li>
</ul>
</body>
</html>
CSS
*{
margin: 0;
padding: 0;
}
body{
display: grid;
place-items: center;
min-height: 100vh;
background: #222;
}
ul{
position: relative;
display:flex;
flex-direction: column;
transform-style: preserve-3d;
}
ul li{
position: relative;
list-style: none;
width: 50px;
height: 50px;
margin: 1px 0px;
}
ul li::after{
content: '';
position: absolute;
left:-5px;
bottom: 0px;
width: 5px;
height: 100%;
background: #3f3f3f;
transform-origin: right;
transform: skewY(-15deg);
}
ul li span{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex !important;
justify-content: center;
align-items: center;
background: #303030;
color: #ddd;
font-size: 30px !important;
transition: .6s ease;
}
ul li:hover span{
z-index: 10;
transition: 0.5s;
color: #fff;
box-shadow: -1px 1px 1px #f1f1f17e;
filter: brightness(1.2);
}
ul li:hover span:nth-child(1){
box-shadow: 0px 0px 0px !important;
background: #333 !important;
}
ul li:hover span:nth-child(2){
transform: translate(5px, -3px);
opacity: 0.2;
}
ul li:hover span:nth-child(3){
transform: translate(10px, -6px);
opacity: 0.4;
}
ul li:hover span:nth-child(4){
transform:translate(15px, -9px);
opacity: 0.6;
}
ul li:hover span:nth-child(5){
transform:translate(20px, -12px);
opacity: 0.8;
}
ul li:hover span:nth-child(6){
transform:translate(25px, -15px);
opacity: 1;
}
ul li:nth-child(1):hover span{
background: rgb(73, 156, 124);
}
ul li:nth-child(2):hover span{
background: rgb(89, 104, 134);
}
ul li:nth-child(3):hover span{
background: rgb(114, 54, 163);
}
ul li:nth-child(4):hover span{
background: rgb(38, 94, 206);
}