<div class="container">
<div class="property is-animated">
<span>Objectives Completed</span>
</div>
<div class="value is-animated">
<span>3</span>
</div>
</div>
* {
box-sizing: border-box;
}
body {
padding: 50px;
}
.container {
overflow: hidden;
}
.is-animated {
font-family: 'Helvetica Neue';
font-weight: bold;
padding: 0;
position: relative;
}
.is-animated span {
display: block;
padding: 0 10px;
width: 200px;
}
.property {
font-size: 150%;
text-align: right;
border-right: 2px solid #000;
width: 0;
overflow: hidden;
float: left;
animation-name: expandProperty;
animation-delay: .5s;
animation-duration: .8s;
animation-fill-mode: forwards;
animation-timing-function: ease-in;
}
.value {
font-size: 300%;
float: left;
overflow: hidden;
}
.value span {
margin-left: -100%;
animation-name: expandValue;
animation-duration: 2.5s;
animation-fill-mode: forwards;
animation-timing-function: ease-in;
}
@-webkit-keyframes expandProperty {
from {
width: 0px;
}
to {
width: 200px;
}
}
@-webkit-keyframes expandValue {
from {
margin-left: -200px;
}
to {
margin-left: 0;
}
}
This Pen doesn't use any external CSS resources.