Difference between revisions of "Template:HZAU-China"

Line 259: Line 259:
 
   </div>
 
   </div>
 
</body>
 
</body>
 +
<script>
 +
  document.getElementById("bianse_1").style.color = "black";
 +
  document.getElementById("HZAU_menu_1").style.backgroundColor = "rgb(249,228,137)";
 +
  window.onscroll = function () {
 +
    var top = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop,
 +
      bianse_1 = document.getElementById("bianse_1"),
 +
      bianse_2 = document.getElementById("bianse_2"),
 +
      bianse_3 = document.getElementById("bianse_3"),
 +
      HZAU_menu_1 = document.getElementById("HZAU_menu_1"),
 +
      HZAU_menu_2 = document.getElementById("HZAU_menu_2"),
 +
      HZAU_menu_3 = document.getElementById("HZAU_menu_3");
  
 +
    if (top > 0 && top < 625.8) {
 +
      bianse_1.style.color = "black";
 +
      bianse_2.style.color = "rgb(249,228,137)";
 +
      bianse_3.style.color = "rgb(249,228,137)";
 +
      HZAU_menu_1.style.backgroundColor = "rgb(249,228,137)";
 +
      HZAU_menu_2.style.backgroundColor = "";
 +
      HZAU_menu_3.style.backgroundColor = "";
 +
      bianse_1.onmouseover = function () {
 +
        bianse_1.style.color = "black";
 +
      }
 +
      bianse_1.onmouseout = function () {
 +
        bianse_1.style.color = "black";
 +
      }
 +
      bianse_2.onmouseover = function () {
 +
        bianse_2.style.color = "black";
 +
      }
 +
      bianse_2.onmouseout = function () {
 +
        bianse_2.style.color = "rgb(249,228,137)";
 +
      }
 +
      bianse_3.onmouseover = function () {
 +
        bianse_3.style.color = "black";
 +
      }
 +
      bianse_3.onmouseout = function () {
 +
        bianse_3.style.color = "rgb(249,228,137)";
 +
      }
 +
    }
 +
    if (top >= 625.8 && top < 1605.2) {
 +
      bianse_1.style.color = "rgb(249,228,137)";
 +
      bianse_2.style.color = "black";
 +
      bianse_3.style.color = "rgb(249,228,137)";
 +
      HZAU_menu_1.style.backgroundColor = "";
 +
      HZAU_menu_2.style.backgroundColor = "rgb(249,228,137)";
 +
      HZAU_menu_3.style.backgroundColor = "";
 +
 +
      bianse_1.onmouseover = function () {
 +
        bianse_1.style.color = "black";
 +
      }
 +
      bianse_1.onmouseout = function () {
 +
        bianse_1.style.color = "rgb(249,228,137)";
 +
      }
 +
      bianse_2.onmouseover = function () {
 +
        bianse_2.style.color = "black";
 +
      }
 +
      bianse_2.onmouseout = function () {
 +
        bianse_2.style.color = "black";
 +
      }
 +
      bianse_3.onmouseover = function () {
 +
        bianse_3.style.color = "black";
 +
      }
 +
      bianse_3.onmouseout = function () {
 +
        bianse_3.style.color = "rgb(249,228,137)";
 +
      }
 +
    }
 +
    if (top >= 1605.2) {
 +
      bianse_1.style.color = "rgb(249,228,137)";
 +
      bianse_2.style.color = "rgb(249,228,137)";
 +
      bianse_3.style.color = "black";
 +
      HZAU_menu_1.style.backgroundColor = "";
 +
      HZAU_menu_2.style.backgroundColor = "";
 +
      HZAU_menu_3.style.backgroundColor = "rgb(249,228,137)";
 +
      bianse_1.onmouseover = function () {
 +
        bianse_1.style.color = "black";
 +
      }
 +
      bianse_1.onmouseout = function () {
 +
        bianse_1.style.color = "rgb(249,228,137)";
 +
      }
 +
      bianse_2.onmouseover = function () {
 +
        bianse_2.style.color = "black";
 +
      }
 +
      bianse_2.onmouseout = function () {
 +
        bianse_2.style.color = "rgb(249,228,137)";
 +
      }
 +
      bianse_3.onmouseover = function () {
 +
        bianse_3.style.color = "black";
 +
      }
 +
      bianse_3.onmouseout = function () {
 +
        bianse_3.style.color = "black";
 +
      }
 +
    }
 +
  }
 +
</script>
  
  
 
</html>
 
</html>

Revision as of 15:29, 27 October 2017

<!DOCTYPE html>