title: How can I disable the Hover Effect for mobile devices in react js
body: <p>I am trying to disable the hover effect for mobile devices which has a lesser than 768px and am doing it by writing media queries like the below mention but it is not working. can anyone please help me with this</p>
  <pre class="lang-css prettyprint-override"><code>@media screen and (min-width: 768px){
      my className:hover {
          display: none;
      }
  }
  </code></pre>
  <p>Here's my HTML and CSS:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.products {
    width: 300px;
    height: 300px;
    border-radius: 15px;
    padding: 1.5rem;
    background: white;
    position: relative;
    display: flex;
    align-items: flex-end;
    transition: 0.4s ease-out;
    box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.5);
  }
  
  .products:hover {
    transform: translateY(-20px);
  }
  
  .products:hover:before {
    opacity: 1;
  }
  
  .products:hover .info {
    opacity: 1;
    transform: translateY(0px);
  }
  
  .products:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
    transition: 0.5s;
    opacity: 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div className="products"&gt;
    &lt;img className="products-img shadow" src={products.img} alt="threeDimage" /&gt;
    &lt;div class="info"&gt;
      &lt;h1 style={{ color: "balack" }}&gt;{products.title}&lt;/h1&gt;
      &lt;p&gt;
        Lorem Ipsum is simply dummy text from the printing and typeseting industry
      &lt;/p&gt;
      &lt;button&gt;Know More&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>