Show DevBest [CSS] Overlapping faces-list

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
There's a fairly popular trend going around on the web at the minute where websites will display faces of people but they will overlap each other.

I've seen this on a few designs, and saw it most recently on

It's a nice effect and decided to recreate it in CSS, no JavaScript required to pull the faces back.



And if you want the full code:
HTML:
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Faces List</title>
       
        <style>
            body {
                padding: 100px;
            }
           
            ul.faces-list {
                list-style: none;
            }
           
            ul.faces-list li {
                display: inline-block;
            }
           
            ul.faces-list li:nth-child(n-1) {
                margin-left: -11px;
            }
           
            ul.faces-list li img {
                width: 30px;
                height: 30px;
                border-radius: 50%;
                border: 2px solid #ffffff;
            }
        </style>
    </head>
   
    <body>
        <ul class="faces-list">
            <li><img src="http://www.radfaces.com/images/avatars/little-pete-wrigley.jpg" alt=""></li>
            <li><img src="http://www.radfaces.com/images/avatars/chris-chambers.jpg" alt=""></li>
            <li><img src="http://www.radfaces.com/images/avatars/lori-beth-denberg.jpg" alt=""></li>
            <li><img src="http://www.radfaces.com/images/avatars/sam-emerson.jpg" alt=""></li>
            <li><img src="http://www.radfaces.com/images/avatars/david-bowie.jpg" alt=""></li>
        </ul>
    </body>
</html>
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
It's an interesting concept and you've executed it well using lure CSS..

Personally I've never been a fan of the concept.
 

griimnak

You're a slave to the money then you die
Jul 20, 2013
957
800
I could probably use this concept for something with project thumbnails.
Regardless good work sunny boy
 

Logicc

Agnwstos.
Jul 28, 2014
37
5
Can you show us how you utilized it. It'd be easier for me to visualize for my own projects if I see it more in others
Well, my website builder has a /HTML button. I just press that and add my codes. Otherwise when i was building a website in Notepad ++, i used to copy and paste the Html codes on my base.
What are you goin to use this code for?
#Cheers
 

Users who are viewing this thread

Top