<div class="container">
<div class="container">
<div class="dontainer">
:D
</div>
</div>
html, body {
html, body {
margin: 0;
}
.container {
position: absolute;
top: 0;
bottom: 50%;
width: 50%;
left: 25%;
outline: 1px solid red;
/* Uncomment for some mild awesomeness: */
/* transition: bottom 0.5s ease-out; */
}
.dontainer {
position: absolute;
bottom: 0;
outline: 1px solid lime;
}
function doTheThing() {
function doTheThing() {
var ce = document.querySelector(".container");
ce.style.bottom = ce.style.bottom === "50%" ? "0%" : "50%";
}
setInterval(doTheThing, 1000);