Click here to Skip to main content
15,885,891 members
Articles / Web Development / HTML5
Tip/Trick

Make gmail User Logo

Rate me:
Please Sign up or sign in to vote.
3.79/5 (8 votes)
16 Aug 2016CPOL 8.8K   7   1
When we go to gmail, we look at the first letter of username in circle. I am trying to explain this object.

Introduction

This is my first tip, excuse me if I made a mistake. When we go to gmail, we look at the first letter of username in circle. In this post, I am trying to explain this object.

is shown as the picture.

Earlier, I thought that this picture cuts a cylindrical shape, but I learned that it is not like this.

Using the Code

CSS Code

CSS
div {
    background-color: #d715fd;
    width: 100px;
    height: 100px;
    border-radius: 100%;
    font-size: 80px;
    color: #fff;
    text-align: center;
}

Now, I am going to get first letter of username and write div container.

JavaScript
$(document).ready(function () {
                var url = document.URL;
                var user = url.split('?')[1]; //I got username with GET.
                user = user.split('=')[1];
                $('#userlogo').html(user[0]);
                $('#welcom').html("Welcome " + user); 
            });

Thanks for reading!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer root
Turkey Turkey
I graduate electrical and electronics engineering. I interest in computer programming , web programming ,micro processor , image processing with morphology.
My hobbies plays football and basketball.

Comments and Discussions

 
GeneralMy vote of 3 Pin
Member 1068954317-Aug-16 19:12
Member 1068954317-Aug-16 19:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.