JSFiddle - React, Tailwind, and code Playground

by dystroy

HTML

<div class="parent">
</div>
<div class="child">
Hello I am child 
</div>

CSS

.parent {
    width:500px;
    height:200px;    
    background-image:url('http://canop.org/blog/wp-content/uploads/2011/11/cropped-bandeau-cr%C3%AAte-011.jpg');
    opacity: 0.2;
}
.child {
}

JavaScript

var pos = $('.parent').offset();
$('.child').css({position:'fixed', left:pos.left, top:pos.top});