💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# loading动画 - css loading动画,有遮罩层 ``` <pre class="calibre14">``` <span class="token2">.</span>loading2<span class="token2">{</span>color<span class="token2">:</span>#fff<span class="token2">;</span>position<span class="token2">:</span>fixed<span class="token2">;</span>box<span class="token">-</span>sizing<span class="token2">:</span>border<span class="token">-</span>box<span class="token2">;</span>left<span class="token2">:</span><span class="token">-</span><span class="token3">9999</span>px<span class="token2">;</span>top<span class="token2">:</span><span class="token">-</span><span class="token3">9999</span>px<span class="token2">;</span>width<span class="token2">:</span><span class="token3">0</span><span class="token2">;</span>height<span class="token2">:</span><span class="token3">0</span><span class="token2">;</span>overflow<span class="token2">:</span>hidden<span class="token2">;</span>z<span class="token">-</span>index<span class="token2">:</span><span class="token3">999999</span><span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">:</span>after<span class="token2">,</span><span class="token2">.</span>loading2<span class="token2">:</span>before<span class="token2">{</span>box<span class="token">-</span>sizing<span class="token2">:</span>border<span class="token">-</span>box<span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">{</span>background<span class="token">-</span>color<span class="token2">:</span><span class="token1">rgba</span><span class="token2">(</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0.7</span><span class="token2">)</span><span class="token2">;</span>width<span class="token2">:</span><span class="token3">100</span><span class="token">%</span><span class="token2">;</span>height<span class="token2">:</span><span class="token3">100</span><span class="token">%</span><span class="token2">;</span>left<span class="token2">:</span><span class="token3">0</span><span class="token2">;</span>top<span class="token2">:</span><span class="token3">0</span><span class="token2">}</span>@keyframes rotation<span class="token2">{</span>from<span class="token2">{</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">0</span><span class="token2">)</span><span class="token2">}</span>to<span class="token2">{</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">359</span>deg<span class="token2">)</span><span class="token2">}</span><span class="token2">}</span>@keyframes blink<span class="token2">{</span>from<span class="token2">{</span>opacity<span class="token2">:</span><span class="token3">.5</span><span class="token2">}</span>to<span class="token2">{</span>opacity<span class="token2">:</span><span class="token3">1</span><span class="token2">}</span><span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">[</span>data<span class="token">-</span>text<span class="token2">]</span><span class="token2">:</span>before<span class="token2">{</span>position<span class="token2">:</span>fixed<span class="token2">;</span>left<span class="token2">:</span><span class="token3">0</span><span class="token2">;</span>top<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span>color<span class="token2">:</span>currentColor<span class="token2">;</span>font<span class="token">-</span>family<span class="token2">:</span>Helvetica<span class="token2">,</span>Arial<span class="token2">,</span>sans<span class="token">-</span>serif<span class="token2">;</span>text<span class="token">-</span>align<span class="token2">:</span>center<span class="token2">;</span>width<span class="token2">:</span><span class="token3">100</span><span class="token">%</span><span class="token2">;</span>font<span class="token">-</span>size<span class="token2">:</span><span class="token3">16</span>px<span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">[</span>data<span class="token">-</span>text<span class="token">=</span><span class="token4">''</span><span class="token2">]</span><span class="token2">:</span>before<span class="token2">{</span>content<span class="token2">:</span><span class="token4">'Loading...'</span><span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">:</span><span class="token1">not</span><span class="token2">(</span><span class="token2">[</span>data<span class="token">-</span>text<span class="token">=</span><span class="token4">''</span><span class="token2">]</span><span class="token2">)</span><span class="token2">:</span>before<span class="token2">{</span>content<span class="token2">:</span><span class="token1">attr</span><span class="token2">(</span>data<span class="token">-</span>text<span class="token2">)</span><span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">[</span>data<span class="token">-</span>text<span class="token2">]</span><span class="token2">:</span>before<span class="token2">{</span>top<span class="token2">:</span><span class="token1">calc</span><span class="token2">(</span><span class="token3">50</span><span class="token">%</span> <span class="token">-</span> <span class="token3">63</span>px<span class="token2">)</span><span class="token2">}</span><span class="token2">.</span>loading2<span class="token2">:</span>after<span class="token2">{</span>content<span class="token2">:</span><span class="token4">''</span><span class="token2">;</span>position<span class="token2">:</span>fixed<span class="token2">;</span>width<span class="token2">:</span><span class="token3">48</span>px<span class="token2">;</span>height<span class="token2">:</span><span class="token3">48</span>px<span class="token2">;</span>border<span class="token2">:</span>solid <span class="token3">4</span>px #fff<span class="token2">;</span>border<span class="token">-</span>left<span class="token">-</span>color<span class="token2">:</span>transparent<span class="token2">;</span>border<span class="token">-</span>radius<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span>top<span class="token2">:</span><span class="token1">calc</span><span class="token2">(</span><span class="token3">50</span><span class="token">%</span> <span class="token">-</span> <span class="token3">24</span>px<span class="token2">)</span><span class="token2">;</span>left<span class="token2">:</span><span class="token1">calc</span><span class="token2">(</span><span class="token3">50</span><span class="token">%</span> <span class="token">-</span> <span class="token3">24</span>px<span class="token2">)</span><span class="token2">;</span>animation<span class="token2">:</span>rotation <span class="token3">1</span>s linear infinite<span class="token2">}</span> <span class="token"><</span>div class<span class="token">=</span><span class="token4">"loading2"</span> data<span class="token">-</span>text<span class="token">=</span><span class="token4">"加载中..."</span><span class="token">></span><span class="token"><</span><span class="token">/</span>div<span class="token">></span> $<span class="token2">(</span><span class="token4">'.loading'</span><span class="token2">)</span><span class="token2">.</span><span class="token1">show</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> $<span class="token2">(</span><span class="token4">'.loading'</span><span class="token2">)</span><span class="token2">.</span><span class="token1">hide</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span> ``` ``` - 无遮罩层 ``` <pre class="calibre14">``` <span class="token2">.</span>loading1<span class="token2">{</span>display<span class="token2">:</span>block<span class="token2">;</span>position<span class="token2">:</span>absolute<span class="token2">;</span>top<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span>left<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span>height<span class="token2">:</span><span class="token3">48</span>px<span class="token2">;</span>width<span class="token2">:</span><span class="token3">48</span>px<span class="token2">;</span>margin<span class="token2">:</span><span class="token">-</span><span class="token3">24</span>px <span class="token3">0</span> <span class="token3">0</span> <span class="token">-</span><span class="token3">24</span>px<span class="token2">;</span>border<span class="token2">:</span><span class="token3">4</span>px <span class="token1">rgba</span><span class="token2">(</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0</span><span class="token2">,</span><span class="token3">0.25</span><span class="token2">)</span> solid<span class="token2">;</span>border<span class="token">-</span>top<span class="token2">:</span><span class="token3">4</span>px black solid<span class="token2">;</span>border<span class="token">-</span>radius<span class="token2">:</span><span class="token3">50</span><span class="token">%</span><span class="token2">;</span><span class="token">-</span>webkit<span class="token">-</span>animation<span class="token2">:</span>spin2 <span class="token3">.6</span>s infinite linear<span class="token2">;</span>animation<span class="token2">:</span>spin2 <span class="token3">1</span>s infinite linear<span class="token2">}</span>@<span class="token">-</span>webkit<span class="token">-</span>keyframes spin2<span class="token2">{</span>from<span class="token2">{</span><span class="token">-</span>webkit<span class="token">-</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">0</span>deg<span class="token2">)</span><span class="token2">}</span>to<span class="token2">{</span><span class="token">-</span>webkit<span class="token">-</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">359</span>deg<span class="token2">)</span><span class="token2">}</span><span class="token2">}</span>@keyframes spin2<span class="token2">{</span>from<span class="token2">{</span><span class="token">-</span>webkit<span class="token">-</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">0</span>deg<span class="token2">)</span><span class="token2">;</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">0</span>deg<span class="token2">)</span><span class="token2">}</span>to<span class="token2">{</span><span class="token">-</span>webkit<span class="token">-</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">359</span>deg<span class="token2">)</span><span class="token2">;</span>transform<span class="token2">:</span><span class="token1">rotate</span><span class="token2">(</span><span class="token3">359</span>deg<span class="token2">)</span><span class="token2">}</span><span class="token2">}</span> ``` ``` - gif动画 ``` <pre class="calibre16">``` <span class="token2">.</span>loading3<span class="token2">{</span> width<span class="token2">:</span><span class="token3">32</span>px<span class="token2">;</span>height<span class="token2">:</span><span class="token3">32</span>px<span class="token2">;</span> background<span class="token">-</span>image<span class="token2">:</span> <span class="token1">url</span><span class="token2">(</span><span class="token4">"data:image/gif;base64,R0lGODlhIAAgAPMAAP///3GaEN7nybrNi9bhusbWoI6vQqC7YOjv2u/z5dnkwIGlLHObEwAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAIAAgAAAE5xDISWlhperN52JLhSSdRgwVo1ICQZRUsiwHpTJT4iowNS8vyW2icCF6k8HMMBkCEDskxTBDAZwuAkkqIfxIQyhBQBFvAQSDITM5VDW6XNE4KagNh6Bgwe60smQUB3d4Rz1ZBApnFASDd0hihh12BkE9kjAJVlycXIg7CQIFA6SlnJ87paqbSKiKoqusnbMdmDC2tXQlkUhziYtyWTxIfy6BE8WJt5YJvpJivxNaGmLHT0VnOgSYf0dZXS7APdpB309RnHOG5gDqXGLDaC457D1zZ/V/nmOM82XiHRLYKhKP1oZmADdEAAAh+QQJCgAAACwAAAAAIAAgAAAE6hDISWlZpOrNp1lGNRSdRpDUolIGw5RUYhhHukqFu8DsrEyqnWThGvAmhVlteBvojpTDDBUEIFwMFBRAmBkSgOrBFZogCASwBDEY/CZSg7GSE0gSCjQBMVG023xWBhklAnoEdhQEfyNqMIcKjhRsjEdnezB+A4k8gTwJhFuiW4dokXiloUepBAp5qaKpp6+Ho7aWW54wl7obvEe0kRuoplCGepwSx2jJvqHEmGt6whJpGpfJCHmOoNHKaHx61WiSR92E4lbFoq+B6QDtuetcaBPnW6+O7wDHpIiK9SaVK5GgV543tz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