<div class="box">
<div class="content">
<h1>This is the box you should be thinking outside of</h1>
</div>
</div>
.box
{
width: 300px;
margin: 0 auto;
padding: 2px;
background-color: #eaab00; /* gold */
/* Single pixel data uri image http://jsfiddle.net/LPxrT/
/* background-image: gold, gold, white */
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAOqrAP///yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=='), url('data:image/gif;base64,R0lGODlhAQABAPAAAOqrAP///yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=='),
url('data:image/gif;base64,R0lGODlhAQABAPAAAP///////yH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==');
background-repeat: no-repeat;
background-size: 0 2px, 0 100%, 0% 2px;
background-position: top center, top center, bottom center;
-webkit-animation: drawBorderFromCenter 4s;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes drawBorderFromCenter {
0% {
background-size: 0 2px, 0 0, 100% 100%;
}
20% {
background-size: 100% 2px, 100% 0, 100% 100%;
}
66%
{
background-size: 100% 2px, 100% 98%, 100% 100%;
}
99%
{
background-size: 100% 2px, 100% 98%, 0 2px;
}
}
.content
{
background: white;
padding: 2em;
text-align: center;
text-transform: uppercase;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.