SVG animated version of Roland Lösslein's Pen Hexagon Preloader.
A Pen by Kevin Chappell on CodePen.
<?xml version="1.0" encoding="utf-8"?> | |
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 250 288" xml:space="preserve"> | |
<polygon id="segment-1" fill="#f7484e" points="250,72 125,0 125,144"> | |
<animate attributeName="points" dur="150ms" begin="0s; segment6open.end" restart="always" fill="freeze" id="segment1" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment6.end" fill="freeze" id="segment1open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment6.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment2.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment1open.begin" from="hidden" to="visible" /> | |
</polygon> | |
<polygon id="segment-2" fill="#f7484e" points="250,72 125,0 125,144" transform="translate(187.1, -36.3) rotate(60)"> | |
<animate attributeName="points" dur="150ms" fill="freeze" begin="segment1.end" id="segment2" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment1open.end" fill="freeze" id="segment2open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment1.end" id="" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment1open.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment3.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment2open.begin" from="hidden" to="visible" /> | |
</polygon> | |
<polygon id="segment-3" fill="#f7484e" points="250,72 125,0 125,144" transform="translate(312.1, 107.7) rotate(120)"> | |
<animate attributeName="points" dur="150ms" fill="freeze" begin="segment2.end" id="segment3" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment2open.end" fill="freeze" id="segment3open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment2.end" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment2open.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment4.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment3open.begin" from="hidden" to="visible" /> | |
</polygon> | |
<polygon id="segment-4" fill="#f7484e" points="250,72 125,0 125,144" transform="translate(250, 288) rotate(180)"> | |
<animate attributeName="points" dur="150ms" fill="freeze" begin="segment3.end" id="segment4" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment3open.end" fill="freeze" id="segment4open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment3.end" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment3open.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment5.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment4open.begin" from="hidden" to="visible" /> | |
</polygon> | |
<polygon id="segment-5" fill="#f7484e" points="250,72 125,0 125,144" transform="translate(62.6, 324.5) rotate(240)"> | |
<animate attributeName="points" dur="150ms" fill="freeze" begin="segment4.end" id="segment5" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment4open.end" fill="freeze" id="segment5open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment4.end" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment4open.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment6.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment5open.begin" from="hidden" to="visible" /> | |
</polygon> | |
<polygon id="segment-6" fill="#f7484e" points="250,72 125,0 125,144" transform="translate(-62.3, 180.6) rotate(299.99)"> | |
<animate attributeName="points" dur="150ms" fill="freeze" begin="segment5.end" id="segment6" to="250,72 187.1,108 125,144" /> | |
<animate attributeName="points" dur="150ms" begin="segment5open.end" fill="freeze" id="segment6open" from="125,72 125,0 125,144" to="250,72 125,0 125,144" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment6.end" from="#f7484e" to="#9c2f2f" /> | |
<animate attributeName="fill" dur="150ms" fill="freeze" begin="segment5open.end" from="#9c2f2f" to="#f7484e" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment1open.begin" from="visible" to="hidden" /> | |
<set attributeName="visibility" attributeType="XML" begin="segment6open.begin" from="hidden" to="visible" /> | |
</polygon> | |
</svg> |
SVG animated version of Roland Lösslein's Pen Hexagon Preloader.
A Pen by Kevin Chappell on CodePen.