JSFiddle - React, Tailwind, and code Playground

by jzhang172

HTML

<div class="div"></div>

CSS

.div{
  height:500px;
  width:500px;
  background:url('http://movieboozer.com/wp-content/uploads/2015/05/my-neighbor-totoro-main-review.jpg');
  position:Relative;
}
.div:before{
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
  content:"";
  background:rgba(22, 255, 171, 0.88);
  transition:2s;
}
.div:hover:before{
  background:red;
}
body,html{
  position:Relative;
}

JavaScript

$(function(){
 $('.div:before').addClass('wto');
    $('.div').css('background-color','orange');
    
    });