Showing posts with label Loading Animation in HTML and CSS. Show all posts
Showing posts with label Loading Animation in HTML and CSS. Show all posts

Friday, October 11, 2019

Loading Animation in HTML and CSS

In this article, I would like to share the code written by my friend and fellow software engineer sir Ernel Fadriquilan

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.



Sample Program Output


Program Listing

index.html

<!DOCTYPE HTML>

<html>

<head>
    <meta charset="utf-8">
  <title>Glowing Loader Ring Animation</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="ring">
        Loading
        <span></span>
    </div>
</body>

</html>


style.css

body
{
    margin:0;
    padding:0;
    background: #262626;
}
.ring
{
    position: absolute;
    top:50%;
    Left: 50%;
    transform: translate(-50%,-50%);
    width: 150px;
    height: 150px;
    background: transparent;
    border: 3px solid #3c3c3c;
    border-radius:50%;
    text-align: center;
    Line-height:150px;
    font-family: sans-serif;
    font-size: 20px;
    color:#fff000;
    Letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 10px #fff000;
    box-shadow: 0 0 20px rgba(0,0,0,.5);
}
.ring:before
{
    content: '';
    position: absolute;
    top: -3px;
    Left: -3px;
    width: 100%;
    height: 100%;
    border  3px solid transparent;
    border-top: 3px solid #fff000;
    border-right: 3px solid #fff000;
    border-radius: 50%;
    animation: animateCircle 2s linear infinite;
}
span
{
    display: block;
    position: absolute;
    top: calc(50% - 2px);
    Left: 50%;
    width: 50%;
    height: 4px;
    background: transparent;
    transform-origin:left;
    animation: animate 2s linear infinite;
}
span:before
{
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    top: -6px;
    right: -8px;
    box-shadow: 0 0 20px #fff000;
}
@keyframes animateCircle
{
    0%
    {
        transform: rotate(0deg);
    }
    100%
    {
        transform: rotate(360deg);
    }

}
@keyframes animate
{
    0%
    {
        transform: rotate(45deg);
    }
    100%
    {
        transform: rotate(405deg);
    }

}