LLWiki正在建设中,欢迎加入我们

“Widget:Lyrics”的版本间差异

跳转到导航 跳转到搜索
标签移动版网页编辑 移动版编辑
<noinclude>{{doc|content={{tl|Lyrics}}。}}</noinclude><includeonly><!--{if !isset($wgLyrics) || !$wgLyrics}--><!--{assign var="wgLyrics" value=true scope="global"}--><scriptstyle>
//</includeonly>JavaScript脚本:<pre lang=js>
var resize = function () {
// 计算渲染后的实际宽度
document.querySelectorAll('.Lyrics_box').forEach( function(ele) {
var width = parseFloat(window.getComputedStyle( ele, null ).getPropertyValue('width'));
if(width < 720) {
ele.querySelectorAll('.Lyrics_original, .Lyrics_translated').forEach( function(self) {
self.style.width = '100%';
});
}
else {
ele.querySelectorAll('.Lyrics_original, .Lyrics_translated').forEach( function(self) {
self.style.width = '';
});
}
});
};
 
window.addEventListener('load', resize);
window.addEventListener('resize', resize);
//</pre>
<includeonly>
</script>
<style>
/* </includeonly>CSS样式表:<pre lang="css"> */
.Lyrics_box {
white-space: pre-wrap;
}
.Lyrics_line {
.Lyrics_original, .Lyrics_translated {
column-count:2;
width:calc(50% - 5px);
column-width:360px;
display: inline-block;
column-gap:10px;
vertical-align:top;
}
.Lyrics_no_translation .Lyrics_originalLyrics_line {
.Lyrics_original {
margincolumn-rightcount:10px1;
}
.Lyrics_original, .Lyrics_translated {
.Lyrics_no_translation .Lyrics_original {
width:100%;
display: inline-blocktable;
margin-right:0;
vertical-align:top;
}
.Lyrics_no_translation .Lyrics_translated, .Lyrics_line ruby {
.Lyrics_box {
width: 100% !important;
}
.Lyrics_original, .Lyrics_translated {
width:100%;
}
.Lyrics_original {
margin-right:0;
}
}
 
.Lyrics_gradient {
-webkit-background-clip: text;