Widget:Carousel:修订间差异
来自OGAS数据中枢
更多语言
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第7行: | 第7行: | ||
.i{position:relative;width:100%;height:100%;max-width:800px;margin:0 auto;object-fit:cover;z-index:2;display:block;border:none} | .i{position:relative;width:100%;height:100%;max-width:800px;margin:0 auto;object-fit:cover;z-index:2;display:block;border:none} | ||
.c-n{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.5);color:#fff;padding:15px 10px;cursor:pointer;border:none;z-index:5} | .c-n{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.5);color:#fff;padding:15px 10px;cursor:pointer;border:none;z-index:5} | ||
.n-p{left:0}.n-n{right:0}.c-i{position:absolute;bottom:15px;right:15px;display:flex;gap: | .n-p{left:0}.n-n{right:0}.c-i{position:absolute;bottom:15px;right:15px;display:flex;gap:6px;z-index:10} | ||
.dot{width: | .dot{width:16px;height:6px;background:rgba(255,255,255,.4);border-radius:3px;cursor:pointer;transition:.3s} | ||
.dot.active{background:#fff; | .dot.active{background:#fff;width:24px} | ||
</style> | </style> | ||
<div class="w-c" id="carousel" data-t="<!--{$thumb}-->"> | <div class="w-c" id="carousel" data-t="<!--{$thumb}-->"> | ||
| 第36行: | 第36行: | ||
if(a.dataset.t)a.href=b+encodeURIComponent(a.dataset.t.trim()); | if(a.dataset.t)a.href=b+encodeURIComponent(a.dataset.t.trim()); | ||
var d=document.createElement('div');d.className='dot'+(i===0?' active':''); | var d=document.createElement('div');d.className='dot'+(i===0?' active':''); | ||
d. | d.onmouseenter=(function(idx){return function(){gs(idx)}})(i);dc.appendChild(d); | ||
} | } | ||
})(); | })(); | ||
| 第58行: | 第58行: | ||
c.onmouseleave=function(){t=setInterval(function(){mv(1)},5000)}; | c.onmouseleave=function(){t=setInterval(function(){mv(1)},5000)}; | ||
</script> | </script> | ||
</includeonly> | </includeonly><noinclude>{{doc|content= | ||
<noinclude>{{doc|content= | |||
用于[[首页/活动轮换图]]的微件,最多支持9图轮播。 | 用于[[首页/活动轮换图]]的微件,最多支持9图轮播。 | ||
==用法== | ==用法== | ||