<?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: Vasanth_sv</title>
    <description>The latest articles on DEV Community by Vasanth_sv (@vasanths).</description>
    <link>https://dev.to/vasanths</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%2F677563%2F730cbee6-f513-4c8f-8fbd-48578807c698.JPG</url>
      <title>DEV Community: Vasanth_sv</title>
      <link>https://dev.to/vasanths</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vasanths"/>
    <language>en</language>
    <item>
      <title>Auto Writing Effect</title>
      <dc:creator>Vasanth_sv</dc:creator>
      <pubDate>Mon, 10 Apr 2023 10:15:19 +0000</pubDate>
      <link>https://dev.to/vasanths/auto-writing-effect-g9o</link>
      <guid>https://dev.to/vasanths/auto-writing-effect-g9o</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;The js makes everything simple&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;1.The auto writing Effect is purely  done by &lt;em&gt;javascript&lt;/em&gt;.&lt;br&gt;
2.The speed of writing can be changed.The &lt;strong&gt;Pause&lt;/strong&gt; and &lt;strong&gt;Resume&lt;/strong&gt; features is added.&lt;br&gt;
3.We can type out text and make the auto typing effect.&lt;br&gt;
4.The given text is sliced by &lt;strong&gt;slice&lt;/strong&gt; method.&lt;br&gt;
5.The &lt;strong&gt;setTimeout&lt;/strong&gt; function is used to call the &lt;strong&gt;typeEffect()&lt;/strong&gt; function in the given second.&lt;br&gt;
6.The &lt;strong&gt;textarea&lt;/strong&gt; is used to enter the custom text.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/vasanthcf/embed/eYPNOap?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>codepen</category>
      <category>css</category>
    </item>
    <item>
      <title>Image Slider</title>
      <dc:creator>Vasanth_sv</dc:creator>
      <pubDate>Sun, 08 May 2022 05:08:50 +0000</pubDate>
      <link>https://dev.to/vasanths/image-slider-414e</link>
      <guid>https://dev.to/vasanths/image-slider-414e</guid>
      <description>&lt;p&gt;&lt;strong&gt;THE HTML part&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;body&amp;gt;
        &amp;lt;h1&amp;gt;The Image Slider&amp;lt;/h1&amp;gt;
     &amp;lt;div class="slider"&amp;gt;
&amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/355321/pexels-photo-355321.jpeg?cs=srgb&amp;amp;dl=pexels-pixabay-355321.jpg&amp;amp;fm=jpg" alt="Photo 1" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/1546166/pexels-photo-1546166.jpeg?cs=srgb&amp;amp;dl=pexels-david-mcbee-1546166.jpg&amp;amp;fm=jpg" alt="Photo 2" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/853199/pexels-photo-853199.jpeg?cs=srgb&amp;amp;dl=pexels-artem-beliaikin-853199.jpg&amp;amp;fm=jpg" alt="Photo 3" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/33545/sunrise-phu-quoc-island-ocean.jpg?cs=srgb&amp;amp;dl=pexels-pixabay-33545.jpg&amp;amp;fm=jpg" alt="Photo 4" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/443446/pexels-photo-443446.jpeg?cs=srgb&amp;amp;dl=pexels-eberhard-grossgasteiger-443446.jpg&amp;amp;fm=jpg" alt="Photo 5" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/1287460/pexels-photo-1287460.jpeg?cs=srgb&amp;amp;dl=pexels-asad-photo-maldives-1287460.jpg&amp;amp;fm=jpg" alt="Photo 6" /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="slides"&amp;gt;
        &amp;lt;img src="https://images.pexels.com/photos/1643389/pexels-photo-1643389.jpeg?cs=srgb&amp;amp;dl=pexels-vecislavas-popa-1643389.jpg&amp;amp;fm=jpg" alt="Photo 7" /&amp;gt;
&amp;lt;/div&amp;gt;


      &amp;lt;button class="btn btn__left"&amp;gt;&amp;amp;larr;&amp;lt;/button&amp;gt;
      &amp;lt;button class="btn btn__right"&amp;gt;&amp;amp;rarr;&amp;lt;/button&amp;gt;
      &amp;lt;div class="dots"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The css part&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      body {
        height: 100vh;
        background-color: rgb(122, 184, 255);
        font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
          sans-serif;
        background: url(https://images.pexels.com/photos/1037992/pexels-photo-1037992.jpeg?cs=srgb&amp;amp;dl=pexels-moose-photos-1037992.jpg&amp;amp;fm=jpg);
        background-size: cover;
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: center;
      }
      h1 {
        text-align: center;
      }
      .slider {
        position: relative;
        max-width: 80%;
        height: 35vmax;
box-shadow: 5px 10px 20px 10px grey;
        margin: 20px auto;
        overflow: hidden;
        top: 0;
      }
      .slides {
        display: flex;
        justify-content: center;
        align-items: center;

        position: absolute;
        transition: transform 1.3s ease;
      }
      .slides &amp;gt; img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .btn {
        width: 60px;
        height: 60px;
        z-index: 10;
        position: absolute;
        text-align: center;
        background-color: transparent;
        border: none;
        font-size: 3em;
        font-weight: 1000;
        cursor: pointer;
        color: rgb(253, 139, 139);
      }
      .btn__left {
        position: absolute;
        transform: translate(-50%, -50%);
        left: 6%;
        top: 45%;
      }
      .btn__right {
        position: absolute;
        transform: translate(50%, -50%);
        right: 6%;
        top: 45%;
      }
      .btn:hover {
        color: lightblue;
      }
      .dots {
        position: absolute;
        left: 40%;
        bottom: 5%;
        display: flex;
      }
      .dot {
        width: 0.9vmax;
        height: 0.9vmax;
        border-radius: 50%;
        border: none;
        margin-right: 5px;
        transition: all 0.7s ease;
        top: 80%;
        background-color: lightblue;
        margin-right: 1.5rem;
      }
      .dot__active {
        background-color: rgb(253, 139, 139);
      }
      @media only screen and (max-width: 689px) {
        .slider {
          width: 100%;
          height: 35%;
        }
        .dots {
          left: 25%;
        }
        .btn {
          font-size: 1.8rem;
        }
      }
      @media only screen and (max-width: 400px) {
        h1 {
          font-size: 1.7rem;
        }
        .slider {
          width: 100%;
          height: 20%;
        }
        .dots {
          left: 13%;
        }
      } ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The js part&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; const slider = document.querySelector(".slider");
      const slides = document.querySelectorAll(".slides");
      const btnLeft = document.querySelector(".btn__left");
      const btnRight = document.querySelector(".btn__right");
      const dotContainer = document.querySelector(".dots");
      let curSlide = 0;
      let maxSlide = slides.length - 1;

      const createNewdots = function () {
        slides.forEach((_, i) =&amp;gt; {
          dotContainer.insertAdjacentHTML(
            "beforeend",
            `&amp;lt;button class="dot" data-slide="${i}"&amp;gt;&amp;lt;/button&amp;gt;`
          );
        });
      };
      // moving logic
      const slideMover = function (curSlide) {
        slides.forEach((s, i) =&amp;gt; {
          s.style.transform = `translate(${100 * (i - curSlide)}%)`;
        });
      };
       // Active dot logic
      const dotActive = function (curr) {
        document.querySelectorAll(".dot").forEach((s, i) =&amp;gt; {
          s.classList.remove("dot__active");
        });
        document
          .querySelector(`.dot[data-slide="${curr}"]`)
          .classList.add("dot__active");
        curSlide = curr;
      };
  // sliding forward
      const nextSlide = function () {
        if (curSlide == maxSlide) {
          curSlide = 0;
        } else {
          curSlide++;
        }
        slideMover(curSlide);
        dotActive(curSlide);
      };
// sliding backward
      const prevSlide = function () {
        if (curSlide == 0) {
          curSlide = maxSlide;
        } else {
          curSlide--;
        }
        slideMover(curSlide);
        dotActive(curSlide);
        clearInterval(automatic);
      };

      const initializer = function () {
        slideMover(0);
        createNewdots();
        dotActive(0);
      };
      initializer();

      btnRight.addEventListener("click", nextSlide);
      btnRight.addEventListener("click", function () {
        clearInterval(automatic);
      });
      btnLeft.addEventListener("click", prevSlide);
      dotContainer.addEventListener("click", function (e) {
        if (e.target.classList.contains("dot")) {
          const clicked = e.target.dataset.slide;

          slideMover(clicked);
          dotActive(clicked);
          clearInterval(automatic);
        }
      });
document .addEventListener("keydown",function(e){
  console.log(e.key)
  if(e.key==="ArrowRight"){

    nextSlide()
         clearInterval(automatic);
  }
  if (e.key==="ArrowLeft"){
    prevSlide()
         clearInterval(automatic);

  }
})
// automatic sliding effect
      const automatic = setInterval(() =&amp;gt; {
        nextSlide();
      }, 2000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;html&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;creating div having class "slider"&lt;/li&gt;
&lt;li&gt;inside slider div another div called slides each slides have the images&lt;/li&gt;
&lt;li&gt;creating buttons Left and Right&lt;/li&gt;
&lt;li&gt;creating div called dot&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;CSS&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;giving height,width and overflow hidden, position to slider div&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.giving display flex,absolute to slide div&lt;/p&gt;

&lt;p&gt;3.using media query made it to responsive&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JS&lt;/strong&gt;&lt;br&gt;
1.using transform:translateX() we make the slide to move&lt;br&gt;
2.implementing forward and backward sliding moment logics&lt;br&gt;
3.creating dot buttons inside Dots container&lt;br&gt;
4.giving dot button logics&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>smooth scrolling</title>
      <dc:creator>Vasanth_sv</dc:creator>
      <pubDate>Wed, 04 May 2022 13:55:27 +0000</pubDate>
      <link>https://dev.to/vasanths/smooth-scrolling-12gn</link>
      <guid>https://dev.to/vasanths/smooth-scrolling-12gn</guid>
      <description>&lt;p&gt;The HTML code,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;nav class="nav"&amp;gt;
      &amp;lt;ul class="nav__links"&amp;gt;
        &amp;lt;li class="nav__item"&amp;gt;
          &amp;lt;a class="nav__link" href="#section-1"&amp;gt;Home&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="nav__item"&amp;gt;
          &amp;lt;a class="nav__link" href="#section-2"&amp;gt;Operations&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;{% embed  %}
        &amp;lt;li class="nav__item"&amp;gt;
          &amp;lt;a class="nav__link" href="#section-3"&amp;gt;Funds&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="nav__item"&amp;gt;
          &amp;lt;a class="nav__link" href="#section-4"&amp;gt;Open account&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="nav__item"&amp;gt;
          &amp;lt;a class="nav__link" href="#section-5"&amp;gt;close account&amp;lt;/a&amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
    &amp;lt;div class="main"&amp;gt;
      &amp;lt;div class="section" id="section-1"&amp;gt;
        &amp;lt;h1&amp;gt;section-1&amp;lt;/h1&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="section" id="section-2"&amp;gt;&amp;lt;h1&amp;gt;section-2&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div class="section" id="section-3"&amp;gt;&amp;lt;h1&amp;gt;section-3&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div class="section" id="section-4"&amp;gt;&amp;lt;h1&amp;gt;section-4&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div class="section" id="section-5"&amp;gt;&amp;lt;h1&amp;gt;section-5&amp;lt;/h1&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;```



## css styles


```* {
        margin: 0;
      }
      .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 5rem;
        width: 100%;
        padding: 0;
        background-color: bisque;
      }

      .nav__links {
        display: flex;
        align-items: center;
        list-style: none;
      }

      .nav__item {
        margin-left: 4rem;
      }

      .nav__link{
        font-size: 1.7rem;
        font-weight: 400;
        color: inherit;
        text-decoration: none;
        display: block;
        transition: all 0.3s;
      }
      .main {
        width: 100%;
        height: auto;
      }

      .section {
        width: 100%;
        position: relative;
        height: 50rem;
        background-color: #ff585f;
        text-align: center;
        border-bottom: 2px solid #000;
        text-transform: capitalize;
      }```


## The JavaScript,


```const allLinks=document.querySelectorAll(".nav__link")
 const navLink=document.querySelector(".nav__links");

      navLink.addEventListener("click",function(e){
       e.preventDefault();
        if(e.target.classList.contains("nav__link")){
          const clicked=e.target.getAttribute("href");
      document.querySelector(clicked).scrollIntoView({behavior:"smooth"});
      //red color on clicked link
          e.target.style.color="red";

        }
        // clearing the red color after 2sec
        setTimeout(()=&amp;gt;{allLinks.forEach((s,i)=&amp;gt;{
        if(e.target.color="red"){

             s.style.color="black";
            }
        })},5000)
      })```


&lt;iframe height="600" src="https://codepen.io/vasanthcf/embed/rNJVyzw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>New year countdown</title>
      <dc:creator>Vasanth_sv</dc:creator>
      <pubDate>Fri, 31 Dec 2021 14:41:01 +0000</pubDate>
      <link>https://dev.to/vasanths/new-year-countdown-2c0i</link>
      <guid>https://dev.to/vasanths/new-year-countdown-2c0i</guid>
      <description>&lt;h2&gt;
  
  
  html codes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
    &amp;lt;title&amp;gt;Timer&amp;lt;/title&amp;gt;
    &amp;lt;link rel="stylesheet" href="timer.css" /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;countdown timer&amp;lt;/h1&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;div class="days"&amp;gt;
        &amp;lt;p class="bigText" id="days"&amp;gt;0&amp;lt;/p&amp;gt;
        &amp;lt;span&amp;gt;days&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="hours"&amp;gt;
        &amp;lt;p class="bigText" id="hours"&amp;gt;0&amp;lt;/p&amp;gt;
        &amp;lt;span&amp;gt;hours&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="minutes"&amp;gt;
        &amp;lt;p class="bigText" id="minutes"&amp;gt;0&amp;lt;/p&amp;gt;
        &amp;lt;span&amp;gt;mins&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="seconds"&amp;gt;
        &amp;lt;p class="bigText" id="seconds"&amp;gt;0&amp;lt;/p&amp;gt;
        &amp;lt;span&amp;gt;seconds&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="newContent hidden"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div class="images hidden"&amp;gt;
      &amp;lt;img src="https://wallpaperaccess.com/thumb/7673258.jpg"  /&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;script src="timer.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;h2&gt;
  
  
  css
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400&amp;amp;display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background-image: url(https://images.pexels.com/photos/624015/pexels-photo-624015.jpeg?auto=compress&amp;amp;cs=tinysrgb&amp;amp;dpr=3&amp;amp;h=750&amp;amp;w=1260);
  background-repeat: no-repeat;
  background-size: cover;
  height: 100vh;
  background-attachment: initial;
  background-position: center;
  font-family: "Poppins", sans-serif;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
h1 {
  font-size: 4rem;
  margin-top: -7%;
  color: rgb(109, 221, 221);
  text-transform: capitalize;
  box-shadow: 2px 2px 7px rgb(123, 209, 190),
    -2px -2px 7px rgba(39, 80, 194, 0.938);
  border-radius: 20px;
  padding-left: 10px;
  padding-right: 10px;
}

.container {
  display: flex;
  margin-top: -20px;
  text-align: center;
  text-transform: capitalize;
}
.bigText {
  font-weight: bold;
  font-size: 3.5rem;
  margin: 3rem 2rem 0.5rem 2rem;
  color: rgb(28, 1, 78);
  text-shadow: 2px 2px 5px rgb(106, 194, 187);
  box-shadow: 2px 2px 7px rgb(123, 209, 190), -2px -2px 7px rgba(39, 80, 194, 1);
  padding: 10px 20px;
  border-radius: 2px;
}

.container span {
  font-size: 1.5rem;
  color: rgb(145, 203, 226);
  /* box-shadow: 2px 2px 5px rgb(255, 255, 255), -2px -2px 5px rgb(80, 138, 224);
  border-radius: 5px;
 */
}

.images {
  position: absolute;
  min-width: 30%;
  height: 70%;
  background-color: antiquewhite;
  top: 15%;
  left: 25%;
  z-index: 10;
}
img {
  position: relative;
  z-index: 10;
  opacity: 1;
}
.newContent {
  position: absolute;

  background-color: thistle;
  opacity: 0.3;
  filter: blur(100px);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 7;
  /* transform: translate(-29.6%, -33%); */
}

.hidden {
  display: none;
}

/* media queries */

@media screen and (max-width: 1000px) {
  .images {
    left: 15%;
  }
}
@media screen and (max-width: 867px) {
  .images {
    width:15%;
    height:30%;
    left:10%;
  }
}
@media screen and (max-width: 750px) {
  .bigText {
    font-size: 2rem;
    margin: 3rem 1rem 0.5rem 1rem;
  }
  .container span {
    font-size: 1rem;
    font-weight: bolder;
  }
  h1 {
    font-size: 2.8rem;
  }
  .images {
    width:60% ;
    height: 60%;
    top: 25%;
    left: 20%;
  }
  img{
    width:100%;
    height:100%;
  }
}

@media screen and (max-width: 425px) {
  .bigText {
    font-size: 1.3rem;
    margin: 3rem 0.6rem 0.5rem 0.2rem;
  }
  .container span {
    font-size: 0.8rem;
    font-weight: bolder;
    letter-spacing: 2px;
  }
  h1 {
    font-size: 1.9rem;
  }
  .images {
    width: 275px;
    height: 175px;
    left: 10%;
  }
  img {
    width: 275px;
    height: 175px;
  }
}
@media screen and (max-width: 300px) {
  .images {
    left: 2%;
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  js
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const days1 = document.getElementById("days");
const hours1 = document.getElementById("hours");
const minutes1 = document.getElementById("minutes");
const seconds1 = document.getElementById("seconds");
const showMessage = document.querySelector(".newContent");
const overlay = document.querySelector(".images");


const timer = () =&amp;gt; {
 // In future you can set date you want.

  future = new Date("jan 1, 2022");
  now = new Date();
  diff = future - now;

  const days = Math.floor(diff / (1000 * 60 * 60 * 24));
  const hours = Math.floor(diff / (1000 * 60 * 60));
  const mins = Math.floor(diff / (1000 * 60));
  const seconds = Math.floor(diff / 1000);

  const d = days;
  const h = hours - days * 24;
  const m = mins - hours * 60;
  const s = seconds - mins * 60;
  days1.textContent = d;
  hours1.textContent = h;
  minutes1.textContent = m;
  seconds1.textContent = s;

// show ,is for after timer stops it shows a picture
// you can set manual stop time here

  const show = d == 0 &amp;amp;&amp;amp; h == 0 &amp;amp;&amp;amp; m == 0 &amp;amp;&amp;amp; s == 0;

  if (show) {
    showMessage.classList.remove("hidden");
    overlay.classList.remove("hidden");
    clearInterval(run);
  }
};

const run = setInterval("timer()", 1000);
closefunction = () =&amp;gt; {
  showMessage.classList.add("hidden");
  overlay.classList.add("hidden");
};

overlay.addEventListener("click", closefunction);
showMessage.addEventListener("click", closefunction);


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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