1,819
个编辑
更改
创建页面,内容为“<noinclude> </noinclude><includeonly><!--{if !isset($wgHover) || !$wgHover}--><!--{assign var="wgHover" value=true scope="global"}--><style> .hover { position: r...”
<noinclude> </noinclude><includeonly><!--{if !isset($wgHover) || !$wgHover}--><!--{assign var="wgHover" value=true scope="global"}--><style>
.hover {
position: relative;
}
.hoverbefore,
.hoverafter {
position: absolute;
transition: .37s all linear
}
.hover:hover .hoverbefore,
.hoverafter {
opacity: 0;
}
.hover:hover .hoverafter {
opacity: 1;
}</style><script>
window.RLQ = window.RLQ || [];
window.RLQ.push(function(){
mw.loader.implement("widgetHover",function($, jQuery){
$('.hover').each(function(){
var height = 0,
width = 0;
$(this).children().each(function(){
if ($(this).height() > height) height = $(this).height();
if ($(this).width() > width) width = $(this).width();
});
if(!/width\s*:\s*\d+px/.test($(this).attr('style'))) $(this).width(width);
if(!/height\s*:\s*\d+px/.test($(this).attr('style'))) $(this).height(height);
});
});
});</script><!--{/if}--></includeonly>
.hover {
position: relative;
}
.hoverbefore,
.hoverafter {
position: absolute;
transition: .37s all linear
}
.hover:hover .hoverbefore,
.hoverafter {
opacity: 0;
}
.hover:hover .hoverafter {
opacity: 1;
}</style><script>
window.RLQ = window.RLQ || [];
window.RLQ.push(function(){
mw.loader.implement("widgetHover",function($, jQuery){
$('.hover').each(function(){
var height = 0,
width = 0;
$(this).children().each(function(){
if ($(this).height() > height) height = $(this).height();
if ($(this).width() > width) width = $(this).width();
});
if(!/width\s*:\s*\d+px/.test($(this).attr('style'))) $(this).width(width);
if(!/height\s*:\s*\d+px/.test($(this).attr('style'))) $(this).height(height);
});
});
});</script><!--{/if}--></includeonly>