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>默认情况下,最小值为 0,最大值为 100。您可以使用 min 和/或 max 属性更改它:</p> <form action="/demo/html/action_page.php"> <label for="customRange" class="form-label">自定义范围</label> <input type="range" class="form-range" id="customRange" name="points" min="0" max="4"> <button type="submit" class="btn btn-primary mt-3">提交</button> </form> </div> </body> </html>