<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rohit Jha</title>
    <description>The latest articles on DEV Community by Rohit Jha (@jrohitofficial_).</description>
    <link>https://dev.to/jrohitofficial_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1378791%2Ff90f0505-79b4-4051-b5c4-bf4eb689c9d8.jpeg</url>
      <title>DEV Community: Rohit Jha</title>
      <link>https://dev.to/jrohitofficial_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jrohitofficial_"/>
    <language>en</language>
    <item>
      <title>Crafting a Digital Glowing Clock with HTML, CSS, and JavaScript</title>
      <dc:creator>Rohit Jha</dc:creator>
      <pubDate>Tue, 09 Apr 2024 05:37:38 +0000</pubDate>
      <link>https://dev.to/jrohitofficial_/crafting-a-digital-glowing-clock-with-html-css-and-javascript-4amg</link>
      <guid>https://dev.to/jrohitofficial_/crafting-a-digital-glowing-clock-with-html-css-and-javascript-4amg</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4iu0bul127mwwraezfmu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4iu0bul127mwwraezfmu.png" alt="Image description" width="800" height="440"&gt;&lt;/a&gt;Introduction:&lt;br&gt;
In today's digital era, creating visually stunning and functional web elements is essential. A digital glowing clock exemplifies this fusion of form and function. In this post, we'll delve into building one using HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;HTML Structure:&lt;br&gt;
We'll start with the HTML, crafting a structured foundation comprising elements for hours, minutes, seconds, and optional AM/PM indicators. Accessibility is paramount, so we'll use semantic tags and provide meaningful descriptions.&lt;/p&gt;

&lt;p&gt;CSS Styling:&lt;br&gt;
Our next step involves CSS to create the glowing effect. Leveraging properties like box-shadow and text-shadow, we'll infuse vibrancy into our clock. By fine-tuning colors and glow intensity, we'll ensure it captivates users.&lt;/p&gt;

&lt;p&gt;JavaScript Functionality:&lt;br&gt;
JavaScript breathes life into our clock, enabling real-time updates of hours, minutes, and seconds. We'll also consider adding features like timezone support and customization options for user preference.&lt;/p&gt;

&lt;p&gt;Performance and Compatibility:&lt;br&gt;
As we finalize, we'll prioritize performance and cross-browser compatibility. Optimizing our code for efficiency ensures smooth operation across devices. Responsive design principles will guarantee seamless display on various screen sizes.&lt;/p&gt;

&lt;p&gt;Conclusion:&lt;br&gt;
Crafting a digital glowing clock merges creativity with technical prowess. By combining HTML, CSS, and JavaScript, we create captivating web elements. Whether for practical timekeeping or aesthetic enhancement, such a clock elevates the user experience with flair and functionality.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://getintorj.github.io/Digital-Clock-Glowing/"&gt;Link&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Html
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
    &amp;lt;title&amp;gt;Digital clock&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="css/style.css" /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div class="hero"&amp;gt;
      &amp;lt;div class="box"&amp;gt;
        &amp;lt;style&amp;gt;&amp;lt;/style&amp;gt;
        &amp;lt;div class="clock"&amp;gt;
          &amp;lt;span id="hrs"&amp;gt;00&amp;lt;/span&amp;gt;
          &amp;lt;span&amp;gt;:&amp;lt;/span&amp;gt;
          &amp;lt;span id="min"&amp;gt;00&amp;lt;/span&amp;gt;
          &amp;lt;span&amp;gt;:&amp;lt;/span&amp;gt;
          &amp;lt;span id="sec"&amp;gt;00&amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;script src="js/index.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Css
* {
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  box-sizing: border-box;
}
.hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2f363e;
  position: relative;
}
.box {
  position: relative;
  width: 800px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clock {
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(40px);
  color: #6e7f92f6;
  z-index: 10;
}
.clock span {
  font-size: 80px;
  width: 110px;
  display: inline-block;
  text-align: center;
  position: relative;
}
.clock span::after {
  font-size: 16px;
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}
#hrs::after {
  content: "HOURES";
  color: #0f0;
  font-weight: 600;
  margin-bottom: -10px;
}
#min::after {
  content: "MINS";
  color: #0ff;
  font-weight: 600;
  margin-bottom: -10px;
}
#sec::after {
  content: "SEC";
  color: #ff0;
  font-weight: 600;
  margin-bottom: -10px;
}

/*------Anemated Border---------*/
.box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from var(--a),
    #0f0,
    #ff0,
    #0ff,
    #f0f,
    #0ff
  );
  border-radius: 20px;
  animation: rotate 6s linear infinite;
}
.box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from var(--a),
    #0f0,
    #ff0,
    #0ff,
    #f0f,
    #0ff
  );
  border-radius: 20px;
  animation: rotate 4s linear infinite;
  filter: blur(40px);
  opacity: 0.75;
}
.box style {
  position: absolute;
  inset: 4px;
  background: #2f363e;
  border-radius: 16px;
  color: #ff0;
  font-size: 20px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
@property --a {
  syntax: "&amp;lt;angle&amp;gt;";
  inherits: false;
  initial-value: 0deg;
}
@keyframes rotate {
  0% {
    --a: 0;
  }
  0% {
    --a: -360deg;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Js
let hrs = document.getElementById("hrs");
let min = document.getElementById("min");
let sec = document.getElementById("sec");

setInterval(() =&amp;gt; {
  let currentTime = new Date();
  hrs.innerHTML =
    (currentTime.getHours() &amp;lt; 10 ? "0" : "") + currentTime.getHours();
  min.innerHTML =
    (currentTime.getMinutes() &amp;lt; 10 ? "0" : "") + currentTime.getMinutes();
  sec.innerHTML =
    (currentTime.getSeconds() &amp;lt; 10 ? "0" : "") + currentTime.getSeconds();
}, 1000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>html</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
