Basics
优质
小牛编辑
131浏览
2023-12-01
描述 (Description)
基本滑块具有手柄和活动填充。 它使用类slider和data-initial-start和data-end属性。
例子 (Example)
以下示例演示如何在Foundation中使用slider 。
<html>
<head>
<title>Slider Basics</title>
<link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/css/foundation.css">
</head>
<body>
<div class = "slider" data-slider data-initial-start = "70" data-end = "100">
<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>