This commit is contained in:
		
							
								
								
									
										17
									
								
								app/components/scroll-down-button.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								app/components/scroll-down-button.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
| <template> | ||||
|   <section class="py-4 sm:flex justify-center items-center"> | ||||
|     <button @click="scrollDown" | ||||
|       class="p-6 h-14 leading-3 flex justify-center bg-green-500 text-white text-lg capitalize font-semibold mb-4 sm:mb-0 rounded-full shadow-md hover:bg-green-400 focus:outline-none focus:ring-4 hover:ring-indigo-200 focus:ring-indigo-300 focus:ring-opacity-100 transition-all"> | ||||
|       ↓ | ||||
|     </button> | ||||
|   </section> | ||||
| </template> | ||||
|  | ||||
| <script setup> | ||||
| function scrollDown() { | ||||
|   window.scrollBy({ | ||||
|     top: window.innerHeight, // une hauteur d’écran | ||||
|     behavior: 'smooth'       // animation fluide | ||||
|   }) | ||||
| } | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user