LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code



    User Profile Widget


    
Anis M

Anis M

@anismashku
  • 83
    Followers
  • 1507
    Tweets
  • 234
    Friends
  • 51
    Likes
  • 42
    Gits
CSS
.left { float: left; }
.right { float: right; }
.clear { clear: both; }

h1 { font-size: 18px; }
h6 { font-size: 13px; }

.profile-card {
    margin: 50px;
    width: 500px;
    height: 400px;
    font: 12px "Myriad Pro";
}
.profile-card .profile-cover {
    background: url('https://dl.dropboxusercontent.com/s/b9zehob0bif4zr0/newyork.jpg') no-repeat center;
    position: relative;
    height: 260px;

    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;

    filter: url(filters.svg#grayscale); /* Firefox 3.5+ */
    filter: gray; /* IE6-9 */
    -webkit-filter: grayscale(1); /* Google Chrome & Safari 6+ */

    transition: all .5s;
    -moz-transition: all .5s; /* Firefox 4 */
    -webkit-transition: all .5s; /* Safari and Chrome */
    -o-transition: all .5s; /* Opera */
}
.profile-card .profile-cover:hover {
    filter: none;
    filter: none;
    -webkit-filter: none;

}
.profile-card .profile-cover .profile-avatar {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border: 5px solid #ffffff;
    width: 150px;
    height: 150px;
    position: absolute;
    margin: 25px auto 0;
    overflow: hidden;
    left: 0;
    right: 0;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    transition: all .5s;
    -moz-transition: all .5s; /* Firefox 4 */
    -webkit-transition: all .5s; /* Safari and Chrome */
    -o-transition: all .5s; /* Opera */
}
.profile-card .profile-cover .profile-avatar:hover {
    margin-top: 23px;
}
.profile-card .profile-cover .profile-avatar .btns-container {
    position: relative;
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links {
    position: absolute;
    top: 110px;
    left: 0;
    right: 0;
    text-align: center;
    display: none;
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a {
    display: inline-block;
    background: #ffffff;
    text-decoration: none;
    padding: 5px;
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a img {
    display: block;
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.zoom-avatar {
    background: rgba(103, 186, 144, 0.7);
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.zoom-avatar:hover {
    background: rgba(103, 186, 144, 1);
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.read-more {
    background: rgba(231, 76, 60, 0.7);
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.read-more:hover {
    background: rgba(231, 76, 60, 1);
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.view-map {
    background: rgba(157, 177, 218, 0.7);
}
.profile-card .profile-cover .profile-avatar .btns-container .profile-links a.view-map:hover {
    background: rgba(157, 177, 218, 1);
}
.profile-card .profile-cover .profile-details {
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(0,0,0,0.5);
    color: #ffffff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: bold;
    padding: 5px 0 7px;
}
.profile-card .profile-cover .profile-details h6 {
    font-weight: normal;
}
.profile-card .profile-info {
    background: #e74c3c;
    color: #ffffff;
    padding: 10px;
    font-family: Arial;
    text-align: justify;
}
.profile-card .profile-info h1 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 3px;
    padding-left: 10px;
    margin-bottom: 5px;
}
.profile-card .profile-info .info-area {
    padding: 0 10px 5px;
}
.profile-card .profile-map {
    border-top: 1px solid #cccccc;
    float: left;
    width: 100%;
}
.profile-card .profile-content {
    background: #ffffff; /* Old browsers */
    /* IE9 SVG, needs conditional override of 'filter' to 'none' */
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZWVlZWUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
    background: -moz-linear-gradient(top,  #ffffff 0%, #eeeeee 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #ffffff 0%,#eeeeee 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #ffffff 0%,#eeeeee 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #ffffff 0%,#eeeeee 100%); /* IE10+ */
    background: linear-gradient(to bottom,  #ffffff 0%,#eeeeee 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 ); /* IE6-8 */
    border: 1px solid #cccccc;
    border-top: none;
    -webkit-border-bottom-right-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -moz-border-radius-bottomright: 5px;
    -moz-border-radius-bottomleft: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}
.profile-card .profile-content ul li {
    float: left;
    padding: 10px 32px;
    text-align: center;
    border-right: 1px solid #eeeeee;
    border-left: 1px solid #ffffff;
}
.profile-card .profile-content ul li:first-child {
    border-left: none;
}
.profile-card .profile-content ul li:last-child {
    border-right: none;
}
.profile-card .profile-content ul li .digits {
    font-weight: bold;
    font-size: 16px;
}

.menu-container {
    position: relative;
    margin: 10px 0 0 10px;
    float: left;
}
.menu-container .list-icon {
    background: url('https://dl.dropboxusercontent.com/s/zgj5vdngzkemvpe/list-icon.png') no-repeat;
    height: 18px;
    width: 24px;
    display: block;
    opacity: 0.5;
    transition: all .5s;
    -moz-transition: all .5s; /* Firefox 4 */
    -webkit-transition: all .5s; /* Safari and Chrome */
    -o-transition: all .5s; /* Opera */
}
.menu-container .list-icon.active,
.menu-container .list-icon:hover {
    opacity: 1;
}
.menu-container .profile-actions {
    border: 1px solid rgba(0, 0, 0, 0.8);
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.8);
}
.menu-container .profile-actions li {
    border-bottom: 1px solid #000000;
}
.menu-container .profile-actions li:last-child {
    border-bottom: none;

}
.menu-container .profile-actions li a {
    display: block;
    width: 100px;
    padding: 5px;
    color: #ffffff;
    text-decoration: none;
    font: 10px Arial;
}
.menu-container .profile-actions li a:hover {
    background: rgba(221, 221, 221, 0.2);
}
.menu-container .profile-actions li:first-child a {
    -webkit-border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topleft: 5px;
    -moz-border-radius-topright: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.menu-container .profile-actions li:last-child a {
    -webkit-border-bottom-right-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -moz-border-radius-bottomright: 5px;
    -moz-border-radius-bottomleft: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;

}
JS
        $(document).ready(function(){
            $('.menu-container').hover(
                function(){
                    $('.profile-actions').slideDown('fast');
                  $('.list-icon').addClass('active');
                },
                function(){
                    $('.profile-actions').slideUp('fast');
                  $('.list-icon').removeClass('active');
                }
            );
            $('.profile-card').mouseleave(function(){
                $('.profile-actions').slideUp('fast');
                $('.profile-info').slideUp('fast');
                $('.profile-map').slideUp('fast');
            });

            $('.profile-avatar').hover(
                function(){
                    $('.profile-links').fadeIn('fast');
                },
                function(){
                    $('.profile-links').hide();
                }
            );
            $('.read-more').click(function(){
                $('.profile-map').slideUp('fast');
                $('.profile-info').slideToggle('fast');
                return false;
            });
            $('.view-map').click(function(){
                $('.profile-info').slideUp('fast');
                $('.profile-map').slideToggle('fast');
                return false;
            });
        });

Description

This is a simple horizontal user profile widget made with HTML5/CSS3/jQuery.
Term
Mon, 11/27/2017 - 21:19

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv