Tagged: x
-
AuthorPosts
-
April 4, 2016 at 11:38 am #866200
belayachimarouane
ParticipantHello,
I want to use a svg animated logo in the header. I can’t figure out how to do it so I was thinking if it was possible from the beginning. here is the code :HTML :
<svg viewBox="0 0 800 600"> <symbol id="s-text"> <text text-anchor="middle" x="50%" y="35%" class="text--line" > SPEED </text> <text text-anchor="middle" x="50%" y="68%" class="text--line2" > TOUCH </text> </symbol> <g class="g-ants"> <use xlink:href="#s-text" class="text-copy"></use> <use xlink:href="#s-text" class="text-copy"></use> <use xlink:href="#s-text" class="text-copy"></use> <use xlink:href="#s-text" class="text-copy"></use> <use xlink:href="#s-text" class="text-copy"></use> </g> </svg>
CSS :
HTML, BODY { height: 100%; } $colors: #360745, #D61C59, #E7D84B, #EFEAC5, #1B8798; BODY { background: hsl(200,70,11); background-size: .12em 100%; font: 16em/1 Arial; } .text--line { font-size: .5em; } svg { position: absolute; width: 100%; height: 100%; } $max: 5; $stroke-step: 7%; .text-copy { fill: none; stroke: white; stroke-dasharray: $stroke-step $stroke-step * ($max - 1); stroke-width: 3px; animation: stroke-offset 9s infinite linear; @for $item from 1 through $max { $stroke-color: nth($colors, $item); &:nth-child(#{$item}) { stroke: $stroke-color; stroke-dashoffset: $stroke-step * $item; } } } @keyframes stroke-offset { 50% { stroke-dashoffset: $stroke-step * $max; stroke-dasharray: 0 $stroke-step * $max*2.5; } }
Thank a lot
April 4, 2016 at 6:51 pm #866779John Ezra
MemberHey there,
Thanks for writing in! Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this.
Alternatively, you can try and see if there is a plugin that will allow you to use SVG animations. However, the easiest way to achieve an animated logo is either by using a GIF file or using HTML5 and CSS animations.
X is quite extensible with child themes, so there are plenty of possibilities. Thanks for understanding. Take care!
April 5, 2016 at 2:39 am #867229belayachimarouane
ParticipantHello! I have achieved it with only CSS! Thank you!
April 5, 2016 at 8:37 am #867638Zeshan
MemberGlad to hear you’ve figured it out! 🙂 Have a good day.
May 17, 2016 at 1:21 am #994987Denver M
ParticipantHi there belayachimarouane,
I’m also looking to use an animated SVG as my logo. Could you please share how you achieved this?
Thank you!
May 17, 2016 at 1:35 am #994994Lely
ModeratorHi Denver,
Animated logo was achieved using CSS animation instead of SVG. SVG is not yet supported.
This link might help:
http://www.w3schools.com/css/css3_animations.aspAlways,
XMay 19, 2016 at 4:19 pm #1000295belayachimarouane
ParticipantHi Denver,
I did it with CSS as well!
Cheers
May 19, 2016 at 9:20 pm #1000726Rad
ModeratorGlad to know, cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-866200 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>