JSFiddle - React, Tailwind, and code Playground
by sathish panduga p
HTML
<body>
<div id='header'></div>
<div id='expand'>Expand</div>
<iframe></iframe>
<div id='footer'></div>
</body>
CSS
body {
width: 100%; height: 100%;
}
#header {
height: 100px;
background: red;
}
iframe {
width: 20px; height: 30px;
background: pink;
}
iframe.expanded {
position: absolute;
top: 0; left: 0;
width: 200px; height: 400px;
z-index: 10;
}
#footer {
height: 100px;
background: blue;
}
JavaScript
function expandListener()
{
$('iframe').addClass('expanded');
}
$('#expand').click(expandListener);