“Widget:Lyrics”的版本间差异

添加887字节 、​ 2020年8月31日 (一) 10:42
撤销Bhsd讨论)的版本5951
标签移动版网页编辑 移动版编辑
(撤销Bhsd讨论)的版本5951)
标签撤销
<noinclude>{{doc|content={{tl|Lyrics}}。}}</noinclude><includeonly><!--{if !isset($wgLyrics) || !$wgLyrics}--><!--{assign var="wgLyrics" value=true scope="global"}--><stylescript>
//</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_original, .Lyrics_translated {
.Lyrics_line {
width:calc(50% - 5px);
column-count:2;
display: tableinline-block;
column-width:360px;
vertical-align:top;
column-gap:10px;
}
.Lyrics_original {
.Lyrics_no_translation .Lyrics_line {
columnmargin-countright:110px;
}
.Lyrics_no_translation .Lyrics_lineLyrics_original {
.Lyrics_original, .Lyrics_translated {
width:100%;
margin-right:0;
display: table;
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;
16,874

个编辑