LLWiki正在建设中,欢迎加入我们!
“Widget:As-song”的版本间差异
跳转到导航
跳转到搜索
小 |
小 |
||
第28行: | 第28行: | ||
padding: 2px; |
padding: 2px; |
||
margin-right: 1em; |
margin-right: 1em; |
||
font-family: 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , '游ゴシック' , '游ゴシック体' , YuGothic , 'Yu Gothic' , 'メイリオ' , Meiryo , 'MS ゴシック' , 'MS Gothic' , HiraKakuProN-W3 , 'TakaoExゴシック' , TakaoExGothic , 'MotoyaLCedar' , 'Droid Sans Japanese' , sans-serif; |
|||
} |
} |
||
.as-song-container select + div { |
.as-song-container select + div { |
2020年10月27日 (二) 23:10的版本
JavaScript脚本:
window.addEventListener('load', function() {
document.querySelectorAll( '.as-song-container' ).forEach(function(ele) {
var select = document.createElement('select'),
nodeList = ele.querySelectorAll('.as-song');
ele.insertBefore(select, ele.firstChild);
select.lang = 'ja';
select.dataset.oldIndex = 0;
nodeList[0].style.display = 'table';
nodeList.forEach(function(table) {
var option = new Option(table.querySelector('big').textContent);
select.add(option);
});
select.onchange = function() {
nodeList[select.dataset.oldIndex].style.display = 'none';
nodeList[select.selectedIndex].style.display = 'table';
select.dataset.oldIndex = select.selectedIndex;
};
});
});
//
CSS样式表:
*/
.as-song-container select {
font-size: 1rem;
padding: 2px;
margin-right: 1em;
font-family: 'ヒラギノ角ゴ ProN' , 'Hiragino Kaku Gothic ProN' , '游ゴシック' , '游ゴシック体' , YuGothic , 'Yu Gothic' , 'メイリオ' , Meiryo , 'MS ゴシック' , 'MS Gothic' , HiraKakuProN-W3 , 'TakaoExゴシック' , TakaoExGothic , 'MotoyaLCedar' , 'Droid Sans Japanese' , sans-serif;
}
.as-song-container select + div {
display: inline-block;
vertical-align: top;
}
.as-song-container .as-song {
display: none;
}
/*