JSFiddle - React, Tailwind, and code Playground
by ggChris
HTML
<div class="container">
<div class="labels">
<div id="label1" class="label" href="#">Sofa
<span />
</div>
<div id="label2" class="label">TV
<span />
</div>
<div id="label3" class="label" href="#">Chest
<span />
</div>
<div id="label4" class="label" href="#">Workplace
<span />
</div>
<div id="label5" class="label" href="#">Entrance
<span />
</div>
<div id="label6" class="label" href="#">Safe Room
<span />
</div>
</div>
<div class="dialog">
<p></p>
<a class="close">X</a>
</div>
</div>
CSS
body {
background:url(http://pcvector.net/uploads/demo/scripts/layout_and_interface/isometric_interactive/images/scene.jpg) center no-repeat;
}
/* page */
/* demo */
.container {
background: url("http://armsonick.zz.mu/Demos/ImageHost/images/1381607643scene1.png") no-repeat scroll center top transparent;
color: #000000;
height: 535px;
margin: 20px auto;
overflow: hidden;
position: relative;
max-width: 1030px;
}
.dialog {
background-color: rgba(163, 154, 77, 0.9);
color: #FFFFFF;
display: none;
height: 140px;
left: 343px;
line-height: 24px;
padding: 100px 30px;
position: absolute;
text-align: center;
top: 97px;
width: 280px;
z-index: 10;
-moz-border-radius: 170px;
-ms-border-radius: 170px;
-o-border-radius: 170px;
-webkit-border-radius: 170px;
border-radius: 170px;
}
.dialog .close {
color: black;
background-color: #65683b;
cursor: pointer;
font-size: 22px;
font-weight: bold;
height: 36px;
line-height: 36px;
position: absolute;
right: 10px;
top: 60px;
width: 36px;
-moz-border-radius: 18px;
-ms-border-radius: 18px;
-o-border-radius: 18px;
-webkit-border-radius: 18px;
border-radius: 18px;
}
.labels p {
display: none;
}
.labels div {
background-color: rgba(203, 189, 58, 0.8);
color: #FFFFFF;
display: none;
height: 50px;
padding: 30px 0 0;
position: absolute !important;
text-align: center;
text-decoration: none;
width: 80px;
-moz-border-radius: 40px;
-ms-border-radius: 40px;
-o-border-radius: 40px;
-webkit-border-radius: 40px;
border-radius: 40px;
}
.labels > div {
background-color: rgba(203, 189, 58, 0.8);
-moz-transition: .3s;
-ms-transition: .3s;
-o-transition: .3s;
-webkit-transition: .3s;
transition: .3s;
}
.labels div:hover {
background-color: rgba(128, 128, 128, 0.8);
}
.labels div span {
border-left: 10px...
JavaScript
jQuery(function(){
// initialize of labels
$('.labels div#label1').fadeIn(100).effect('bounce', { times:3 }, 300, function() {
$('.labels div#label2').fadeIn(100).effect('bounce', { times:3 }, 300, function() {
$('.labels div#label3').fadeIn(100).effect('bounce', { times:3 }, 300, function() {
$('.labels div#label4').fadeIn(100).effect('bounce', { times:3 }, 300, function() {
$('.labels div#label5').fadeIn(100).effect('bounce', { times:3 }, 300, function() {
$('.labels div#label6').fadeIn(100).effect('bounce', { times:3 }, 300);
});
});
});
});
});
// dialog close
$('.dialog .close').click(function() {
$(this).parent().fadeOut(500);
return false;
});
// display dialog on click by labels
$('.labels div').click(function() {
$('.dialog p').html( $(this).find('p').html() ).parent().fadeIn(500);
return false;
});
// close dialog on click outside
$('.container').click(function() {
$('.dialog').fadeOut(500);
});
});