JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
HTML Settings
Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
<svg height="0" width="0" style="position:absolute;margin-left: -100%;">
<g id="clock-icon">
<style>
<![CDATA[
@media screen and (max-width:900px){
.hide{
display: none;
}
}
]]>
</style>
<!--ICON SHAPE-->
<rect id="minute-hand" transform="rotate(0 16 17)" x="15.386" y="6.464" width="1.227" height="11.439"/>
<rect id="hour-hand" transform="rotate(0 16 17)" x="15.386" y="10.291" width="1.227" height="7.626"/>
<rect id="second-hand" transform="rotate(0 16 17)" x="15.88" y="7.46" width="0.24" height="9.83"/>
<path d="M15.879,2.531c-8.14,0-14.739,6.599-14.739,14.739c0,8.14,6.599,14.739,14.739,14.739s14.739-6.6,14.739-14.739
C30.618,9.13,24.02,2.531,15.879,2.531z M15.879,30.852c-7.511,0-13.6-6.089-13.6-13.6c0-7.511,6.089-13.601,13.6-13.601 c7.511,0,13.6,6.089,13.6,13.601C29.479,24.763,23.391,30.852,15.879,30.852z"/>
<rect x="24.794" y="28.95" transform="matrix(0.7071 0.7071 -0.7071 0.7071 28.9921 -10.8671)" width="5.639" height="1.226"/>
<rect x="1.076" y="28.866" transform="matrix(-0.7071 0.7071 -0.7071 -0.7071 27.6973 47.4864)" width="5.876" height="1.227"/>
<path d="M9.946,1.291c-1.044-0.812-2.353-1.3-3.778-1.3C2.761-0.009,0,2.752,0,6.158c0,1.425,0.488,2.733,1.3,3.778
l0.524-0.524l0.002,0.002l7.859-7.859L9.684,1.553L9.946,1.291z M6.167,1.198c0.634,0,1.233,0.132,1.79,0.35L1.558,7.948
c-0.218-0.557-0.35-1.156-0.35-1.79C1.208,3.418,3.428,1.198,6.167,1.198z"/>
<path d="M30.7,9.936C31.512,8.892,32,7.583,32,6.158c0-3.406-2.762-6.167-6.168-6.167
c-1.425,0-2.733,0.488-3.777,1.3l0.524,0.524l-0.002,0.002l7.858,7.859l0.002-0.002L30.7,9.936z M30.793,6.158
c0,0.634-0.133,1.233-0.352,1.79l-6.398-6.399c0.557-0.218,1.156-0.35,1.789-0.35C28.572,1.198,30.793,3.418,30.793,6.158z"/>
<!--ICON SHAPE ends -->
<script type="text/javascript">
(function(undefined){
var setTime = function(){
var date = new Date(),
MINUTE = 60, HOUR = 60*MINUTE,
seconds = date.getSeconds(),
minutes = (date.getMinutes()*MINUTE) + seconds,
hours = (date.getHours()*HOUR)+minutes;
document.getElementById('second-hand').setAttribute('transform', 'rotate('+360*(seconds/MINUTE)+',16,17)');
document.getElementById('minute-hand').setAttribute('transform', 'rotate('+360*(minutes/HOUR)+',16,17)');
document.getElementById('hour-hand').setAttribute('transform', 'rotate('+360*(hours/(12*HOUR))+',16,17)');
}
setTime();
var interval = setInterval(setTime,1000);
})();
</script>
</g>
</svg>
<!-- svg sorce document ends -->
<div class="svg-time-b">
<svg class="icon" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x2 is-delay-1s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x3 is-delay-2s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x4 is-delay-3s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x5 is-delay-4s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x6 is-delay-5s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x5 is-delay-6s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x4 is-delay-7s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x3 is-delay-8s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-x2 is-delay-9s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<svg class="icon is-delay-10s" viewBox="0 0 32 32">
<use xlink:href="#clock-icon"></use>
</svg>
<a href="http://iconmelon.com" class="text-be">SVG time!</a>
</div>
body{
margin:0;
padding:0;
background: #fff;
background: #111;
text-align: center;
}
.icon{
width: 32px;
height: 32px;
fill: #22A62B;
animation: anima 30s ease-out infinite;
}
.icon.is-check{
fill: #FE4365;
}
.icon.is-x10{
width: 320px;
height: 320px;
}
.icon.is-x2{
width: 64px;
height: 64px;
}
.icon.is-x3{
width: 96px;
height: 96px;
}
.icon.is-x4{
width: 128px;
height: 128px;
}
.icon.is-x5{
width: 160px;
height: 160px;
}
.icon.is-x6{
width: 192px;
height: 192px;
}
@keyframes anima {
0% {fill: #22A62B;color: #22A62B;}
10% {fill: #14E3E6;color: #14E3E6;}
20%{fill: #195BEF;color: #195BEF;}
30%{fill: #DF26D9;color: #DF26D9;}
40%{fill: #DF2688;color: #DF2688;}
50%{fill: #FEA903;color: #FEA903;}
60%{fill: #DF26DE;color: #DF26DE;}
70%{fill: #2C4AED;color: #2C4AED;}
80%{fill: #14E3F7;color: #14E3F7;}
90%{fill: #195BEF;color: #195BEF;}
100% {fill: #22A62B;}
}
.icon.is-delay-1s{
animation-delay: .5s;
}
.icon.is-delay-2s{
animation-delay: 1s;
}
.icon.is-delay-3s{
animation-delay: 1.5s;
}
.icon.is-delay-4s{
animation-delay: 2s;
}
.icon.is-delay-5s{
animation-delay: 2.5s;
}
.icon.is-delay-6s{
animation-delay: 3s;
}
.icon.is-delay-7s{
animation-delay: 3.5s;
}
.icon.is-delay-8s{
animation-delay: 4s;
}
.icon.is-delay-9s{
animation-delay: 4.5s;
}
.icon.is-delay-10s{
animation-delay: 5s;
}
.svg-time-b{
margin-top: 100px;
display: inline-block;
min-width: 1360px;
}
.svg-time-b .icon + .icon{
margin-left: 16px;
}
.svg-time-b > .text-be{
font-size: 24px;
color: white;
font-family: monospace;
margin-top: 32px;
display: block;
text-decoration: none;
animation: anima 30s ease-out infinite;
animation-delay: 2.5s;
color: #22A62B;
}
# more info:
# https://tympanus.net/codrops/2013/11/27/svg-icons-ftw/
Also see: Tab Triggers