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

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

来自Rizline中文维基
 
(未显示同一用户的3个中间版本)
第1行: 第1行:
<html>
{{Infobox
<script>
|name  = SongInfo1
// 切换难度(EZ 1 / HD 6 / IN 9)
|state =
function cycleDifficulty(element) {
|title = 详细信息
  const states = JSON.parse(element.dataset.states);
|headerstyle = background:#0055FF;
  const currentIndex = parseInt(element.dataset.current);
|labelstyle  = background:#00FF00;
   const nextIndex = (currentIndex + 1) % states.length;
|label1   = 预览时间
 
|data1    = 114.5s-191.9s
  element.textContent = states[nextIndex];
|label2   = Riztime时间
  element.dataset.current = nextIndex;
|data2    = 100.1s-100.3s<br>100.6s-101.5s<br>166.7s-185.0s<br>200.0s-215.8s
    
|header3  = 主题颜色
  updateOutput(); // 更新输出
|label4   = 常规主题
}
|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
// 切换比例(4:3 / 16:9)
|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>
function cycleRatio(element) {
|label6   = Riztime主题2
  const states = JSON.parse(element.dataset.states);
|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>
  const currentIndex = parseInt(element.dataset.current);
|label7  = Riztime主题3
  const nextIndex = (currentIndex + 1) % states.length;
|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 = states[nextIndex];
|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>
  element.dataset.current = nextIndex;
|header9   = 谱面信息
 
|header10  = Tap/Drag/Hold
  updateOutput(); // 更新输出
|label11  = {{diff|EZ|1}}
}
|data11    = 25/35/45
 
|label12  = {{diff|HD|5}}
// 根据当前难度和比例更新输出
|data12    = 114/124/134
function updateOutput() {
|label13  = {{diff|IN|9}}
  const difficulty = document.getElementById("difficulty").textContent;
|data13    = 350/234/233
  const ratio = document.getElementById("ratio").textContent;
|header14  = 线条数
 
|label15  = {{diff|EZ|1}}
  // 定义输出规则
|data15    = 250
   const outputRules = {
|label16  = {{diff|HD|5}}
    "EZ 1": { "4:3": "111aaa", "16:9": "222aaa" },
|data16    = 368
    "HD 6": { "4:3": "111bbb", "16:9": "222bbb" },
|label17  = {{diff|IN|9}}
    "IN 9": { "4:3": "111ccc", "16:9": "222ccc" }
|data17    = 1145
  };
}}
 
  // 获取当前输出
   const output = outputRules[difficulty]?.[ratio] || "Unknown";
  document.getElementById("output").textContent = output;
}
</script>
<table width="100%" style="border:none; border-collapse:collapse;">
  <tr>
    <td colspan="2" style="text-align:center; background-color:#A9FBFF;"><div id="difficulty" onclick="cycleDifficulty(this)"
    data-states='["EZ 1", "HD 6", "IN 9"]' data-current="0" style="cursor:pointer;">
  EZ 1
</div></td>
  </tr>
  <tr>
    <td width="15%" height="300px" style="text-align:center; background-color:#ABCDEF;"><div id="ratio" onclick="cycleRatio(this)"
    data-states='["4:3", "16:9"]' data-current="0" style="cursor:pointer;">
  4:3
</div></td>
    <td><span id="output">111aaa</span></td>
   </tr>
</table>
</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