<div class="container">
<div id="ball"></div>
<p id="xyz">XYZ Industries</p>
</div>
@bggradient: linear-gradient(to right top, #ffffff, #f5f4f5, #ebeaeb, #e2dfe0, #d9d5d5);
@ball: #f57724;
@text: #414141;
* {
margin: 0 auto;
-webkit-user-select: none;
font-family: 'Cabin Condensed', sans-serif;
}
body {
width: 100vw;
height: 100vh;
background-image: @bggradient;
}
.centered() {
margin: auto;
position: absolute;
bottom: 0;
left: 0;
top: 0;
right: 0;
}
.container {
.centered();
width: 500px;
height: 150px;
#xyz {
position: absolute;
font-size: 40px;
display: inline-block;
white-space: nowrap;
font-weight: bold;
overflow: hidden;
top: 50px;
left: 115px;
color: darken(@text, 10%);
animation: textreveal 4s infinite alternate;
}
#ball {
position: absolute;
top: 27.5px;
left: 50px;
height: 98px;
width: 100px;
white-space: nowrap;
overflow: hidden;
background-color: @ball;
border-radius: 50%;
animation: ballmove 4s infinite alternate;
z-index: 1;
box-shadow: 0px 3px 15px rgba(0,0,0,0.3);
}
@keyframes ballmove {
0%{transform: translate(0px, 8.5px) scale(0.1);}
10%{transform: translateX(0px) scale(0.5);}
40%{transform: translateX(255px) scale(0.5);}
60%{transform: translate(240px, 8.5px) scale(0.1);}
70%{transform: translate(240px, 8.5px) scale(0.15);}
80%{transform: translate(240px, 8.5px) scale(0.1);}
90%{transform: translate(240px, 8.5px) scale(0.15);}
100%{transform: translate(240px, 8.5px) scale(0.1);}
}
@keyframes textreveal {
0% {width: 0;}
10% {width: 0;}
40% {width: 240px;}
100% {width: 240px;}
}
}
View Compiled
// no js required! Thanks for visiting!
This Pen doesn't use any external JavaScript resources.