<div class="loader"> <svg viewBox="0 0 100 100" height="100px" width="100px"> <defs> <linearGradient y2="0%" x2="100%" y1="0%" x1="0%" id="gradient1"> <stop stop-color="#4f8ef7" offset="0%"></stop> <stop stop-color="#a663cc" offset="50%"></stop> <stop stop-color="#f74f6f" offset="100%"></stop> </linearGradient> <linearGradient y2="0%" x2="100%" y1="0%" x1="0%" id="gradient2"> <stop stop-color="#f7b34f" offset="0%"></stop> <stop stop-color="#5ef7a5" offset="50%"></stop> <stop stop-color="#4f8ef7" offset="100%"></stop>
.loader { display: inline-block; width: 100px; height: 100px; position: relative; } .loader svg { width: 100%; height: 100%; animation: rotate-svg 2s linear infinite; transform-origin: center center;