Bonjour,
j'ai trouvé ce script dans la discussion : Créer un scroll de div en div
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
 !DOCTYPE html>
<html>
<head>
    <title></title>
    <style>
         body{
          background-color: #1C1E2B;
          overflow: hidden;
          }
          
          div{
            position: absolute;
            left: 0;
            width:100%;
            font-size: 3em;
            text-align: center;
          }
          
         #div1{
            top: 20px;
            height:400px;
            background-color: red;
        }
        
        #div2{
            top: 440px;
            height:400px;
            background-color:#00ff00;
        }
        
       #div3{
           top: 860px;
           height:1000px;
           background-color: blue;
        }
        
        #div4{
           top: 1880px;
           height:1000px;
           background-color: yellow;
        }
    </style>
</head>
<body>
 <div id="div1">div 1</div>
 <div id="div2">div 2</div>
 <div id="div3">div 3</div>
 <div id="div4">div 4</div>
<script>
  var numDiv=1;//numéro de la div
  var div=[document.getElementById("div1"),document.getElementById("div2"),document.getElementById("div3"),document.getElementById("div4")];
  
  var dy=[];
  dy[1]=0;
 
  for (var i=2;i<=div.length;i++) dy[i]=div[i-1].offsetTop-div[0].offsetTop;
  window.addEventListener("wheel", mouseWheelHandler);
 
   function mouseWheelHandler(e){
     e.preventDefault();
     var delta=e.deltaY;
     var doc = document.body; // Safari, Edge
     var html = document.documentElement; // Chrome, Firefox, IE and Opera
      if (delta>0) numDiv++; else  numDiv--;
      if (numDiv<1) numDiv=1;
      if (numDiv>div.length) numDiv=div.length;
      
      for(var j=1;j<=div.length;j++) if (numDiv==j) html.scrollTop=doc.scrollTop=dy[j]; 
   }
</script>
</body>
</html>
Très bon script.
J'aurai juste un problème.

Je n'arrive pas à le faire marcher lorsque le scroll se trouve dans un div à l'intérieur de ma page.
Je pense qu'il s'agit d'un réglage :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
window.addEventListener("wheel", mouseWheelHandler);
Merci tout de même. Si je trouve je renvoie la réponse.