JSFiddle - React, Tailwind, and code Playground
by D S
HTML
<div class="mainBox">
<div class="leftBox">
<div class="LeftBox-InnterTop">
<div class="SmallBoxes 1">hi</div>
<div class="SmallBoxes"></div>
<div class="SmallBoxes"></div>
<div class="SmallBoxes"></div>
</div>
<div class="LeftBox-InnterButtom"></div>
</div>
<div class="rightBox"></div>
</div>
CSS
.mainBox {
width:600px;
height:300px;
background:black;
}
.leftBox {
float:left;
width:300px;
height:300px;
background-image:url(http://goo.gl/Z3Escd);
}
.rightBox {
float:right;
width:300px;
height:300px;
background:#381234;
}
.LeftBox-InnterTop {
width:100%;
height:90%;
background: rgba(255, 255, 255, 0.50);
opacity: 0;
-webkit-transition: opacity 0.5s linear;
transition: opacity 0.5s linear;
}
.LeftBox-InnterButtom {
width:100%;
height:10%;
background: rgba(0, 0, 0, 0.80);
}
.SmallBoxes {
float:left;
width:50%;
height:50%;
background-color:rgba(168, 14, 16, 0.50);
box-shadow: inset 0 0 1px #fff;
}
.mainBox:hover .LeftBox-InnterTop {
opacity: 1;
}
JavaScript
var danial = $(".leftBox").css("background-image");
if (danial.search('Z3Escd') == 1){
console.log("done");
}
if($(".leftBox").css("background-image") === "url") {
//$(".leftBox").css("background", "#C2DAEF");
//console.log("yes");
}