打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

用户:Xp00000000/Sandbox:修订间差异

来自Rizline中文维基
 
(未显示同一用户的27个中间版本)
第1行: 第1行:
<html>
{{Infobox
<style>
|name  = SongInfo1
.normal-style {
|state =
    padding: 10px;
|title = 详细信息
    background: #eee;
|headerstyle = background:#0055FF;
    cursor: pointer;
|labelstyle  = background:#00FF00;
    margin: 10px 0;
|label1  = 预览时间
    border-radius: 4px;
|data1    = 114.5s-191.9s
    transition: background 0.3s;
|label2  = Riztime时间
}
|data2    = 100.1s-100.3s<br>100.6s-101.5s<br>166.7s-185.0s<br>200.0s-215.8s
.clicked-style {
|header3  = 主题颜色
    background: #ccc;
|label4  = 常规主题
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
|data4    = <span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span>
}
|label5  = Riztime主题1
</style>
|data5    = <span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span>
 
|label6  = Riztime主题2
<script>
|data6    = <span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span>
function toggleColor(element) {
|label7  = Riztime主题3
    element.classList.toggle("clicked-style");
|data7    = <span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span>
    // 更新文本内容
|label8  = Riztime主题4
    element.textContent = element.classList.contains("clicked-style")
|data8    = <span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span><br><span style="display: inline-block;width: 30px;height: 30px;background: #000000;color: white;"></span><span style="position: relative; left: 10px; top: -8px;"><big>#000000</big></span>
        ? "已选中 (点击取消)"  
|header9  = 谱面信息
        : "点击选择";
|header10  = Tap/Drag/Hold
    // 存储状态
|label11  = {{diff|EZ|1}}
    localStorage.setItem('boxState', element.classList.contains("clicked-style"));
|data11    = 25/35/45
}
|label12  = {{diff|HD|5}}
// 页面加载时恢复状态和文本
|data12    = 114/124/134
window.onload = function() {
|label13  = {{diff|IN|9}}
    var box = document.getElementById('myInteractiveBox');
|data13    = 350/234/233
    if(box) {
|header14  = 线条数
        var isClicked = localStorage.getItem('boxState') === 'true';
|label15  = {{diff|EZ|1}}
        box.classList.toggle("clicked-style", isClicked);
|data15    = 250
        box.textContent = isClicked
|label16  = {{diff|HD|5}}
            ? "已选中 (点击取消)"  
|data16    = 368
            : "点击选择";
|label17  = {{diff|IN|9}}
    }
|data17    = 1145
};
}}
</script>
 
<div id="myInteractiveBox" class="normal-style" onclick="toggleColor(this)">
点击选择
</div>
</html>

2025年10月23日 (四) 13:53的最新版本

详细信息
预览时间 114.5s-191.9s
Riztime时间 100.1s-100.3s
100.6s-101.5s
166.7s-185.0s
200.0s-215.8s
主题颜色
常规主题 #000000
#000000
#000000
Riztime主题1 #000000
#000000
#000000
Riztime主题2 #000000
#000000
#000000
Riztime主题3 #000000
#000000
#000000
Riztime主题4 #000000
#000000
#000000
谱面信息
Tap/Drag/Hold
EZ 1 25/35/45
HD 5 114/124/134
IN 9 350/234/233
线条数
EZ 1 250
HD 5 368
IN 9 1145