W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container mt-3"> <h2>范围中的步进</h2> <p>默认情况下,范围数值之间的间隔为 1。您可以使用 step 属性更改它:</p> <form action="/demo/html/action_page.php"> <label for="customRange" class="form-label">自定义范围</label> <input type="range" class="form-range" id="customRange" step="10" name="points"> <button type="submit" class="btn btn-primary mt-3">提交</button> </form> </div> </body> </html>