JSFiddle - React, Tailwind, and code Playground
by rur_d
HTML
<h1>Hello</h1>
<br/>
<br/>
<br/>
<br/>
<p><a onclick="toggle();" >toggle</a></p>
<div id="container" class="clearfix">
<h1>Hello</h1>
<p>asfesdgasfesefsf</p>
<div id="Example_H" class="example">
</div>
</div>
<p>adfter content</p>
CSS
#Example_H {
-moz-box-shadow: inset 0px 0px 50px #000;
-webkit-box-shadow: inset 0px 0px 50px #000;
box-shadow: inset 0px 0px 50px #000;
}
#container {
display:none;
width: 100%;
overflow: hidden;
position:relative;
height: 150px
}
body {
border: 0px;
margin: 0px;
padding: 0px;
}
.example {
width: 150%;
position:absolute;
left: -40px;
top: 0px;
z-index:-1;
height: 100%;
background-color: #777777;
}
#container h1 {
margin-top: 30px;
}
.clearfix::after {
clear: both;
content: ' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}
JavaScript
$(document).ready( function(){
} );
function toggle(){
$("#container").slideToggle();
}