A Pen by Jonathan Bakebwa on CodePen.
Created
March 2, 2022 09:13
-
-
Save codebender828/d14340302c5d74c046fec60a1db0197e to your computer and use it in GitHub Desktop.
Stacked avatars SCSS
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
<div class="flex flex-col justify-center items-center"> | |
<div class="wrapper flex mb-3"> | |
<a href="#" target="__blank" class="avatar bg-green-100 w-12 h-12 shadow-lg"><img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1100&q=80" alt="avatar1" class="image"> | |
</a> | |
<a href="#" target="__blank" class="avatar bg-green-100 w-12 h-12 shadow-lg"><img src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60" alt="avatar2" class="image"> | |
</a> | |
<a href="#" target="__blank" class="avatar bg-green-100 w-12 h-12 shadow-lg"><img src="https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1100&q=80" alt="avatar3" class="image"> | |
</a> | |
<a href="#" target="__blank" class="avatar bg-green-100 w-12 h-12 shadow-lg"><img src="https://images.unsplash.com/photo-1540746354979-c2ecadbc01d6?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=60" alt="avatar4" class="image"> | |
</a> | |
<a href="#" target="__blank" class="avatar bg-green-100 w-12 h-12 shadow-lg"><img src="https://images.unsplash.com/photo-1547147607-6eab7b49f3ee?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60" alt="avatar5" class="image"> | |
</a> | |
</div> | |
<p class="text-xl font-regular"> | |
Live users | |
</p> | |
</div> |
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
@import url('https://fonts.googleapis.com/css?family=Rubik:300,400,700&display=swap'); | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
background: #dfdfef; | |
height: 100%; | |
font-family: 'Rubik', sans-serif; | |
} | |
html { | |
width: 100%; | |
height: 100%; | |
} | |
.avatar { | |
overflow: hidden; | |
border-radius: 99%; | |
border: 3px #fff solid; | |
margin-left: -10px; | |
opacity: 0.6; | |
transition: all 0.1s ease-in; | |
flex-shrink: 0; | |
&:hover { | |
opacity: 1; | |
cursor: pointer; | |
transform: translateY(-5px); | |
z-index: 2; | |
} | |
.image { | |
width: 100%; | |
overflow: hidden; | |
object-fit: cover; | |
} | |
} | |
.wrapper { | |
position: relative; | |
} |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.0.6/tailwind.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment