扫码关注官方订阅号
bootstrap可以轻松创建经常看到的表单类型,编码非常的简单,所以本篇文章我们就来看看使用bootstrap创建表单的方法。
制作表单的方法
首先利用
我们来看bootstrap创建表单的具体示例
代码如下
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>sample</title> <script src="bootstrap-4.2.1-dist/js/bootstrap.min.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="bootstrap-4.2.1-dist/css/bootstrap.min.css" /> </head> <body style="padding: 50px;"> <form> <div class="form-group"> <label for="email">电子邮箱</label> <input type="email" class="form-control" id="email" placeholder="电子邮箱"> </div> <div class="form-group"> <label for="pass">密码</label> <input type="password" class="form-control" id="pass" placeholder="密码"> </div> <div> <label for="file">文件上传:</label> <input type="file" id="file"> <p class="help-block">显示文件帮助。</p> </div> <div class="check"> <label> <input type="checkbox">确认 </label> </div> <button type="submit" class="btu btn-default">发送</button> </form> </body> </html>
运行效果如下:
此外,还可以创建内联表单。我们只要在
总结,以上就是本篇文章的全部内容了,更多精彩内容大家可以关注php中文网其他相关教程栏目!!!
以上就是如何使用bootstrap制作form表单的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部