31.01.2025 03:31:16 pm
Столкнулся и я... Если написать, непосредственно код в HTML документ:
То всё будет работать, анимировать. Если данный код "завернуть" в файл, затем вывести в нужном месте:
То будет просто картинка, без анимации.
<svg viewBox="0 0 100 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Extract -->
<rect fill='#999999' stroke='#999999' width='30' height='30' x='0' y='0'>
<animate attributeName='opacity' calcMode='spline' dur='2' values='1;0;1;' keySplines='.5 0 .5 1;.5 0 .5 1' repeatCount='indefinite' begin='0'></animate>
</rect>
<rect fill='#999999' stroke='#999999' width='30' height='30' x='0' y='50'>
<animate attributeName='opacity' calcMode='spline' dur='2' values='1;0;1;' keySplines='.5 0 .5 1;.5 0 .5 1' repeatCount='indefinite' begin='-.2'></animate>
</rect>
<rect fill='#999999' stroke='#999999' width='30' height='30' x='0' y='100'>
<animate attributeName='opacity' calcMode='spline' dur='2' values='1;0;1;' keySplines='.5 0 .5 1;.5 0 .5 1' repeatCount='indefinite' begin='-.4'></animate>
</rect>
<rect fill='#999999' stroke='#999999' width='30' height='30' x='0' y='150'>
<animate attributeName='opacity' calcMode='spline' dur='2' values='1;0;1;' keySplines='.5 0 .5 1;.5 0 .5 1' repeatCount='indefinite' begin='-.6'></animate>
</rect>
<rect fill='#999999' stroke='#999999' width='30' height='30' x='0' y='200'>
<animate attributeName='opacity' calcMode='spline' dur='2' values='1;0;1;' keySplines='.5 0 .5 1;.5 0 .5 1' repeatCount='indefinite' begin='-.8'></animate>
</rect>
<!-- End: Extract -->
</svg>
То всё будет работать, анимировать. Если данный код "завернуть" в файл, затем вывести в нужном месте:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<use xlink:href="<?php echo APP_URL; ?>file/svg/getter.svg#extract"></use>
</svg>
То будет просто картинка, без анимации.
- Жалоба