Skip to content

CSS Profil Animation


HTML CODE:

<!DOCTYPE html>
<html>
<head>
    <title>page</title>
    <link rel="stylesheet" type="text/css" href="2.page.css">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
</head>
<body>

    <div class="wrapper">
        <div class="column">
            <div class="imgBox">
                <img src="https://images.pexels.com/photos/301958/pexels-photo-301958.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260">
            </div>
            <div class="details">
                <div class="content" >
                    <h1>Member Name<br><span>Developer</span></h1>
                    <ul>
                        <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                        <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                        <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                        <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                    </ul>
                </div>
            </div>
        </div>

        <div class="column">
            <div class="imgBox">
                <img src="https://images.pexels.com/photos/775358/pexels-photo-775358.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260">
            </div>
            <div class="details">
                <div class="content" >
                    <h1>Member Name<br><span>Developer</span></h1>
                    <ul>
                    <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                    <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                    <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                    <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                </ul>
                </div>
            </div>
        </div>

        <div class="column">
            <div class="imgBox">
                <img src="https://images.pexels.com/photos/594610/pexels-photo-594610.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260">
            </div>
            <div class="details">
                <div class="content" >
                    <h1>Member Name<br><span>Developer</span></h1>
                    <ul>
                    <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                    <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                    <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                    <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                </ul>
                </div>
            </div>
        </div>

        <div class="column">
            <div class="imgBox">
                <img src="https://images.pexels.com/photos/774909/pexels-photo-774909.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260">
            </div>
            <div class="details">
                <div class="content" >
                    <h1>Member Name<br><span>Developer</span></h1>
                    <ul>
                    <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                    <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                    <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                    <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                </ul>
                </div>
            </div>
        </div>

        <div class="column">
            <div class="imgBox">
                <img src="https://images.pexels.com/photos/220453/pexels-photo-220453.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260">
            </div>
            <div class="details">
                <div class="content" >
                    <h1>Member Name<br><span>Developer</span></h1>
                    <ul>
                    <li><a href="#"><i class="fab fa-facebook-f"></i></a></li>
                    <li><a href="#"><i class="fab fa-twitter"></i></a></li>
                    <li><a href="#"><i class="fab fa-linkedin-in"></i></a></li>
                    <li><a href="#"><i class="fab fa-instagram"></i></a></li>
                </ul>
                </div>
            </div>
        </div>
    </div>

</body>
</html>

CSS CODE:

@import url('https://fonts.googleapis.com/css?family=Open+Sans:300');
body{
    margin:0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
}
.wrapper{
    width: 100%;
    min-height: 100px;
    background: #262626;
    position: absolute;
    top: 50%;
    transform:  translateY(-50%); 
}
.column{
    position: relative;
    width: 20%;
    height: 400px;
    float: left;
    overflow: hidden;
}
.column .imgBox img{
    max-width: 100%;
    transition: 1s;
}
.column:hover .imgBox img{
    transform: scale(1.5);
}
.column .details {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: #fff;
    text-align: center;
    transform: scale(.5);
    visibility: hidden;
    transition: .5s;
}
.column:hover .details{
    transform: scale(1);
    visibility: visible;
}
.column .details .content{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    box-sizing: border-box;
}
.column .details .content h1{
    position: relative;
    margin: 0;
    padding: 0;
    font-size: 20px;
    color: #262626;
    text-transform: uppercase;
}
.column .details .content h1 span{
    font-size: 16px;
    color: #999;
}
.column .details .content h1:before{
    content: "";
    position: absolute;
    bottom: -10px;
    width: 50px;
    height: 2px;
    background: #f00;
    left: 50%;
    transform: translateX(-50%);
}
.column .details .content ul{
    position: relative;
    display: flex;
    padding: 0;
    width: 70%;
    margin: 30px auto 0;
    transform: translateY(100px);
    opacity: 0;
    transition: .5s;
}
.column:hover .details .content ul{
    transform: translateY(0px);
    opacity: 1;
}
.column .details .content ul li{
    list-style: none;
    width: 25%;
    text-align: center;
}
.column .details .content ul li a{
    display: block;
    color: #262626;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    box-sizing: border-box;
    border: 1px solid #262626;
    transition: .5s;
}
.column .details .content ul li a:hover{
    background: #f00;
    color: #fff;
    border: 1px solid #262626;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: