<div class="box">
<span class="l-top"></span>
<span class="l-left"></span>
<div class="box-inner">
<span class="hover-me">Hover me!</span>
<span class="hi">Hi!</span>
<span class="message">Welcome to the No JS Text Animation</span>
</div>
<span class="l-right"></span>
<span class="l-bottom"></span>
</div>
<div class="box box-next">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</div>
body {
overflow: hidden
}
.box {
margin: 0 auto;
position: relative;
color: #feb090;
width: 570px;
height: 50px;
font-size: 2rem;
box-sizing: border-box;
}
.box-inner {
position: relative;
}
.box-next {
opacity: 0;
transition: all 1s ease;
font-size: inherit
}
.box > div > span, .box > span {
display: block;
transition: all 1s ease;
position: absolute;
top:0px;
left: 0;
width: 100%;
height: 100%;
}
.box > div > span {
top:7px;
}
.box > div > span:not(:first-child) {
opacity: 0;
}
.box > div > span.hover-me {
transition-duration: .1s;
}
.box > span.l-top, .box > span.l-bottom {
border-top: 2px solid #b17b64;
transform: scale(0, 1);
transform-origin: left;
transition-duration: .2s
}
.box > span.l-left, .box > span.l-right {
border-left: 2px solid #b17b64;
transform: scale(1, 0);
transform-origin: top;
transition-duration: .3s
}
.box > span.l-bottom {
top: 48px;
transition-delay: .5s
}
.box > span.l-right {
left: 568px;
transition-delay: .5s
}
.box:hover > span.l-top, .box:hover > span.l-left, .box:hover > span.l-bottom, .box:hover > span.l-right {
opacity: 1;
transform: scale(1, 1);
}
.box:hover > div > span.hover-me {
left: -150px;
opacity: 0;
}
.box:hover > div > span.hi {
opacity: 1;
left: 14px;
}
.box:hover > div > span.message {
opacity: 1;
left: 65px;
transition-delay: .25s;
transition-duration: .2s;
}
body > div.box:first-child:after {
content: '\25bc';
position:absolute;
left: 47%;
top: 50px;
opacity: 0;
transition: all .2s ease;
}
body > div.box:first-child:hover:after {
opacity: 1;
}
.box:hover + div.box-next {
opacity: 1;
margin-top: 32px
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.