JSFiddle - React, Tailwind, and code Playground
HTML
<ul class="conteudo">
<li class="nav-item"><a href="#">Página 1</a></li>
<li class="nav-item"><a href="#">Página 2</a></li>
<li class="nav-item"><a href="#">Página 3</a></li>
</ul>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">Menu</label>
<div class="conteudo-movel">
<p>Meu menu off-canvas.</p>
</div>
CSS
body {
overflow-x: hidden;
}
.conteudo {
background: #f6f6f6;
width: 100%;
height: 100%;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 0;
list-style: none;
}
.nav-trigger {
position: absolute;
clip: rect(0, 0, 0, 0);
}
label[for="nav-trigger"] {
position: fixed;
top: 15px;
left: 15px;
z-index: 2;
padding: 4px 8px;
cursor: pointer;
background-color: #f00;
}
.nav-trigger:checked + label {
left: 515px;
}
.nav-trigger:checked ~ .conteudo-movel {
left: 500px;
}
.nav-trigger + label, .conteudo-movel {
transition: left 0.2s;
}
.conteudo-movel {
min-width: 100%;
min-height: 100%;
background-color: #fff;
position: relative;
top: 0;
bottom: 100%;
left: 0;
color: #fff;
z-index: 1;
padding: 4em;
background-color: #000;
background-size: 200%;
}