我在我的网站上制作了 2 个样式表(白天和黑夜,因为我发现晚上在漆黑的房间里很难阅读全白背景样式)
我找到了样式切换开关,我希望在 css 切换器上使用它们。
<div class="switch switch-blue">
<input type="radio" class="switch-input" name="view2" value="week2" id="week2" checked>
<label for="week2" class="switch-label switch-label-off">Week</label>
<input type="radio" class="switch-input" name="view2" value="month2" id="month2">
<label for="month2" class="switch-label switch-label-on">Month</label>
<span class="switch-selection"></span>
</div>
如果我在文档中加载两个样式表
<a href="#" onclick="setActiveStyleSheet('default'); return false;">style 1</a>
<a href="#" onclick="setActiveStyleSheet('alternate 1'); return false;">style 2</a>
如何使单选按钮在这两者之间切换?
谢谢