Листья на ветру с использованием HTML5 Canvas
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
.falling-leaves { position: absolute; top: 0; width: 100%; height: 100%; background: url(/img/sidebar-bg.png) no-repeat center center; background-size: cover; overflow: hidden; z-index: -1; } .leaf-scene { position: absolute; top: 0; left: 0; bottom: 0; width: 100%; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; } .leaf-scene div { position: absolute; top: 0; left: 0; width: 20px; height: 20px; background: url(/img/leaf.svg) no-repeat; background-size: 100%; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-backface-visibility: visible; backface-visibility: visible; } |
1 2 |
<div class="falling-leaves"></div> <script src="/js/leaves2.js"></script> |
ОХ, и это чудесно. Забрала к себе !
Рад слышать 😃👍