js代码
<script> var stage = document.querySelector('.stage'); var background = document.querySelector('.background'); var rotation = 0; document.querySelector('.button_prev'). addEventListener('click', function () {return applyStyles(rotation += 90);}); document.querySelector('.button_next'). addEventListener('click', function () {return applyStyles(rotation -= 90);}); function applyStyles() { background.style.filter = 'hue-rotate(' + rotation + 'deg)'; stage.style.transform = 'rotateZ(' + rotation + 'deg)'; }</script>