Bootstrap表单控件使用方法详解

表单作为Bootstrap的核心内容,主要功能是用来与用户做交流的一个网页控件,良好的表单设计能够让网页与用户更好的沟通。

Bootstrap表单控件使用方法详解

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <!-- 使用最新的浏览器内核解析 --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- 移动设备优先 --> <meta content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <link href="https://www.jb51.net/bootstrap/css/bootstrap.min.css"> <!--[if lt IE 9]> <script src="https://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script> <scri></script> <![<endifdiv></endifdiv>]--> </head> <body> <div> <!-- 表单的栅格系统使用 form-horizontal div的栅格系统使用 row --> <form> <div> <label for="username">用户名:</label> <div> <input type="text" value="" placeholder="请输入用户名"></input> </div> </div> <div> <label for="password">密 码:</label> <div> <input type="password" value="" placeholder="请输入用密码"></input> </div> </div> <div> <label for="file">上传文件:</label> <div> <input type="file" value=""></input> </div> </div> <div> <label >爱好:</label> <div> <div> <label> <input type="checkbox">画画</input> </label> <label> <input type="checkbox">音乐</input> </label> <label> <input type="checkbox">体育</input> </label> </div> </div> </div> <div> <label>学历:</label> <div> <div> <label> <input type="radio">中学</input> </label> <label> <input type="radio">大专</input> </label> <label> <input type="radio">研究生</input> </label> </div> </div> </div> <div> <label>个人简历</label> <div> <textarea rows="5" placeholder="请输入"> </textarea> </div> </div> <div> <button type="button">提交表单</button> </div> </form> </div> <!-- jQuery first, then Bootstrap JS. --> <script src="https://www.jb51.net/bootstrap/js/jquery.min.js"></script> <script src="https://www.jb51.net/bootstrap/js/bootstrap.js"></script> </body> </html>

如果大家还想深入学习,可以点击这里进行学习,再为大家附3个精彩的专题:

Bootstrap学习教程

Bootstrap实战教程

Bootstrap Table使用教程

Bootstrap插件使用教程

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwdsgw.html