In this video, we will create an awesome text effect CSS only. This video on how to clip image on text using -webkit-background-clip. For a preview click on Demo If you want to get the complete source code in a zip file then click the "Fork me on GitHub" button below that will redirect you to my GitHub account where you found all my source code files. Copy Code(select code part and copy using "CTRL + C" or using R Click to mouse)🡇 HTML <! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta http-equiv = "X-UA-Compatible" content = "IE=edge" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title >How to clip image on text</ title > <!-- style.css --> < link rel = "stylesheet" href = "style.css" > </ head > < body >
In this video, we will create a digital clock using HTML, CSS & vanilla JavaScript.
JavaScript mini project for beginners.
If you want to get the complete source code in a zip file then click the "Fork me on GitHub" button below that will redirect you to my GitHub account where you found all my source code files.
Copy Code(select code part and copy using "CTRL + C" or using R Click to mouse)🡇
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Digital Clock Using JS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="d-clock">
<div class="inner-circle">
<div>
<span id="hr">00</span>
<span id="dot">:</span>
<span id="min">00</span>
</div>
<span class="time">time</span>
</div>
</div>
<script src="main.js"></script>
</body>
</html>
CSS
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
border: none;
outline: none;
font-family: 'Roboto', sans-serif;
user-select: none;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #1e2140;
}
.d-clock {
width: 400px;
height: 400px;
border-radius: 50%;
background-color: #151932;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.d-clock::before {
content: '';
position: absolute;
z-index: -2;
width: 100%;
height: 100%;
border-radius: 50%;
transform: scale(1.3);
background: linear-gradient(130deg, #444776, #151932);
filter: blur(50px);
}
.d-clock::after {
content: '';
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
border-radius: 50%;
transform: scale(1.15);
background: linear-gradient(310deg, #2b2d53, #151932);
}
.inner-circle {
width: 370px;
height: 370px;
border-radius: 50%;
background: transparent;
border: 10px solid #fd6e70;
display: flex;
justify-content: center;
align-items: center;
position: relative;
}
.inner-circle div {
display: flex;
font-size: 7.5em;
color: #d6e0fa;
}
.inner-circle div #dot {
animation: animate 1s cubic-bezier(1, 0, 0, 0) infinite;
}
@keyframes animate {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.inner-circle .time {
position: absolute;
top: 72%;
left: 30%;
font-size: 2em;
color: #d6e0fa;
text-transform: uppercase;
letter-spacing: 25px;
}
Subscribe to me on YouTube
Like & Comment on my video on YouTube & press the bell icon to get notification first.
Follow me on Instagram
Comment down any query if you have.
nice
ReplyDelete