cssRulesの違い document.style Sheets[0].rulesとcssRulesは違います。document.style Sheets[0].rulesを選択しますcssRulesの違い