隧芒官网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
1.1 KiB

  1. $(function () {
  2. $("#ip").click(function() {
  3. $("html,body").animate({ scrollTop: $(".videoBox").offset().top }, 1000)
  4. });
  5. $("#ai").click(function() {
  6. $("html,body").animate({ scrollTop: $("#aiText").offset().top }, 1000)
  7. });
  8. $("#zb").click(function() {
  9. $("html,body").animate({ scrollTop: $(".coverF").offset().top }, 1000)
  10. });
  11. $("#hz").click(function() {
  12. $("html,body").animate({ scrollTop: $(".teamworkBoxtop").offset().top }, 1000)
  13. });
  14. $("#wm").click(function() {
  15. $("html,body").animate({ scrollTop: $(" .suimang ").offset().top }, 1000)
  16. });
  17. let video1 = document.getElementById("video1");
  18. let video2 = document.getElementById("video2");
  19. video1.play();
  20. window.onscroll = function () {
  21. var t = document.documentElement.scrollTop || document.body.scrollTop; //变量t就是滚动条滚动时,到顶部的距离
  22. // video2.pause()
  23. if (t < 700) {
  24. video2.pause();
  25. video1.play();
  26. } else if (t >= 700) {
  27. video1.pause();
  28. video2.play();
  29. }
  30. }
  31. })