Vertical

优质
小牛编辑
121浏览
2023-12-01

描述 (Description)

垂直滑块用于通过使用vertical类显示垂直滑块,并将data vertical设置为true

例子 (Example)

以下示例演示如何在Foundation中使用vertical slider

<html>
   <head>
      <title>Slider Vertical</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
   </head>
   <body>
      <div class = "slider vertical" data-slider data-initial-start = "25" data-end = "100" data-vertical = "true">
         <span class = "slider-handle" data-slider-handle role = "slider" tabindex = "1"></span>
         <span class = "slider-fill" data-slider-fill></span>
         <input type = "hidden">
      </div>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
      <script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
      <script>
         $(document).ready(function() {
            $(document).foundation();
         })
      </script>
   </body>
</html>