HTML CSS & JAVASCRIPT, YouTube

Digital Clock with Animated Progress-bar

Digital Clock with Animated Progress-bar HTML CSS & Vanilla Javascript 2021

Coding BD given here Digital Clock with Animated Progress-bar | HTML CSS & Vanilla Javascript 2021 . Our creative digital clock styles are the most important part Of digital clock in html and javascript. We created an expanded css animation tutorial. We have given more importance to the css animation tutorial. We don’t have to use javascript effects because they are using any Heighlly effect. Thank you so much.

😍😍 If You like this video Please like, share and subscribe This video.😍😍

😍😍 Check Others Programming Video👇

➡️ creative button hover effects: https://www.youtube.com/watch?v=3FbyiuhhhTI

➡️ How to Download Source code in Coding BD: https://www.youtube.com/watch?v=WXAZ-BScKBE&t=3s

➡️Responsive website html css javascript | part( 1 ): https://www.youtube.com/watch?v=g0ART…

➡️ Responsive Services Section: https://www.youtube.com/watch?v=wvLky…

➡️ CSS Clip Path Hover Circle Hover Effects: https://www.youtube.com/watch?v=cRSgo…

➡️ CSS Responsive CARD Hover Effects & Adding Stroke to Text | Html5 CSS3 2021: https://www.youtube.com/watch?v=QVMJ5…

➡️ Neon Light Button Animation Effects on Hover | CSS Snake Border: https://www.youtube.com/watch?v=GtVSF…

➡️ Responsive Box Model Web Design Using CSS Flexbox: https://www.youtube.com/watch?v=03RuV…

➡️ Digital Clock with Animated Progress-bar | HTML CSS & Vanilla Javascript: https://www.youtube.com/watch?v=6A6Hp…

➡️ How to create a light to dark mode for HTML CSS & Vanilla Javascript 2021: https://www.youtube.com/watch?v=43FbR…

➡️Scroll top button : https://www.youtube.com/watch?v=9fDEJ…

➡️ Animated eid mubarak 2021 using Html CSS & Javascript: https://www.youtube.com/watch?v=60H2g…

Here is all Source code ( Digital Clock with Animated Progress-bar ). You can follow this steps:

  1. Create 1 folder
  2. create 1 HTML file: index.html
  3. create 1 CSS file: style.css
  4. copy HTML code and pest HTML file, copy CSS code and past CSS file
  5. Now give a smile and jump out loud. 😍😍
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Real Clock</title>
    <link rel="stylesheet" href="./style.css">
</head>
<body>
    <div class="container">
        <div class="clock-container">
            <div class="hours">
                <span>Hours</span>
                <p id='hour'> 00 </p>
            </div>
            <div class="colon"></div>
            <div class="minutes">
                <span>Minutes</span>
                <p id='minute'> 00 </p>
            </div>
            <div class="colon"></div>
            <div class="seconds">
                <span>Seconds</span>
                <p id='second'> 00 </p>
            </div>
        </div>
        <div class="bottom">
            <div class="progress-bar" id="progress"></div>
        </div>
    </div>
    <script src="./app.js"></script>
</body>
</html>
@import url("https://fonts.googleapis.com/css2?family=Roboto:[email protected];300;400;500;700;900&display=swap");
:root {
    --purple-dark: #000000;
    --purple-light: #000000;
    --gray-light: #E5E3E8;
    --gray-dark: #A5A2A9;
    --light: #fcf8fb;
    --transition: all 150ms cubic-bezier(.46, 1.13, .67, .87);
}

body {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    color: var(--purple-light);
    background-color: var(--purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.15;
    position: relative;
}

.clock-container {
    width: 405px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 35px 50px;
    background-color: var(--purple-dark);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.825);
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
}

.clock-container span {
    text-transform: uppercase;
    font-size: 10px;
    text-align: right;
    display: block;
}

.clock-container p {
    font-size: 60px;
    color: var(--light);
    font-weight: 100;
}

.clock-container p:first-letter {
    letter-spacing: 5px;
}

.container {
    width: 560px;
    height: 320px;
    display: block;
    box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.215), -5px -5px 25px rgba(0, 0, 0, 0.125);
    background-color: var(--gray-light);
    position: relative;
}

.container .top {
    width: 215px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.container .top p {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
    color: var(--purple-dark);
    letter-spacing: .5px;
    cursor: pointer;
}

.container .bottom {
    height: 7px;
    width: 100%;
    position: absolute;
    bottom: 0;
    background-color: #aaa4b2;
}

.container .bottom .progress-bar {
    width: 240px;
    height: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 9;
    background-color: #000000;
    transition: var(--transition);
}

.colon {
    --size: 3px;
    width: var(--size);
    height: 15px;
    position: relative;
    margin-left: 10px;
    margin-right: 10px;
}

.colon::before {
    content: '';
    width: 100%;
    height: var(--size);
    background-color: #9892a3;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
}

.colon::after {
    content: '';
    width: 100%;
    height: var(--size);
    background-color: #9892a3;
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 50%;
}

.toast {
    width: 405px;
    color: var(--light);
    padding: 15px 24px;
    background-color: var(--purple-dark);
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    transition: var(--transition);
    z-index: 99;
}

.toast p {
    font-weight: 400;
    font-size: 18px;
}

.toast p:first-letter {
    text-transform: uppercase;
}

.toast.show {
    bottom: 50px;
}

.toast span {
    align-self: center;
    font-weight: 500;
    cursor: pointer;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
const hour = document.getElementById('hour');
const minute = document.getElementById('minute');
const second = document.getElementById('second');
const progress = document.getElementById('progress');

const showCurrentTime = () => {
    const date = new Date();
    const hr = date.getHours();
    const min = date.getMinutes();
    const sec = date.getSeconds();

    hour.innerText = hr;
    minute.innerText = min;
    second.innerText = sec;

    progress.style.width = (sec/60) * 100 + "%";
}

setInterval(showCurrentTime, 1000)

Don’t Forget to Follow me on all Social Network

YouTube: https://www.youtube.com/channel/UCw9etYfx-25oKB_qt1fFNWw

Facebook Page: https://www.facebook.com/codingbd2021

LinkedIn: https://www.linkedin.com/in/sajjat-ho… 

GitHub: https://github.com/cgsaleh8383

You can see Loader| Creative CSS Animation Effects

Leave a Reply

Your email address will not be published. Required fields are marked *