模板:动态显示/CSS:修订间差异

添加31字节 、​ 2022年8月19日 (星期五)
支持时间参数
(修复一个笔误;动画名更改,以防冲突)
(支持时间参数)
<includeonly>{{#vardefine:num|{{{1|3}}}}}{{#vardefine:time|{{{2|1000}}}}}{{#vardefine:showtime|{{#expr:100 / {{#var:num}}}}}}{{#vardefine:animeName|{{{3|salt-carousel}}}-animated-{{#var:num}}-{{#var:time}}}}
@keyframes salt-carousel-animated-{{#var:numanimeName}}
{
0% { opacity: 1; z-index: 20; }
{{#loop:count|1|{{#var:num}}|
.animated-{{#var:num}}>.animated-item:nth-child({{#var:count}}){
animation: salt-carousel-animated-{{#var:numanimeName}} {{#expr:{{#var:num}} * {{#var:time}}}}ms {{#expr:{{#var:time}} * ( {{#var:count}} - 1 )}}ms infinite;
-webkit-animation: salt-carousel-animated-{{#var:numanimeName}} {{#expr:{{#var:num}} * {{#var:time}}}}ms {{#expr:{{#var:time}} * ( {{#var:count}} - 1 )}}ms infinite;
}
}}</includeonly><noinclude>{{doc}}[[分类:模板功能性子页面]]</noinclude>