html %3cselect%3e 标签,bootstrap表单form

本文概述

在Bootstrap中,存在三种类型的表单布局:

垂直形式(默认)

水平形式

内联表格

自举表格规则

这3种表单布局有3条标准规则:

始终使用

(有助于提高使用屏幕阅读器的用户的可访问性)

中包装标签和表单控件(需要最佳间距)

将类.form-control添加到所有文本,和元素

1)引导程序垂直形式(默认)

Bootstrap example

Vertical Form Example

Email address

Password

Login

2)Bootstrap内联表格

在Bootstrap内联表单中,所有元素都是内联的,左对齐,并且标签在旁边。

此示例仅适用于视口内宽度至少为768px的表单!

例:

3)自举水平形式

如果要创建水平表单,则必须添加一些其他规则。

水平形式的其他规则:

将类.form-horizo​​ntal添加到

元素

将class .control-label添加到所有元素

例:

Bootstrap Example

Horizontal form Example

Email:

Password:

Submit

Bootstrap 4表格

在Bootstrap4中,表单控件会自动使用Bootstrap接收某些全局样式。

所有%20textual%20%3Cinput%3E,%20%3Ctextarea%3E,%20和%20%3Cselect%3E%20elements%20with%20class%20.form-control%20have%20a%20width%20of%20100%。

堆叠(全角)形式

引导程序4提供了全宽度的堆叠形式。

例:

让我们以创建带有两个输入字段,一个复选框和一个提交按钮的堆叠表单为例。

Bootstrap Example

Stacked form

Email:

Password:

Remember me

Submit

<!doctype html> <html> <head> <meta charset="utf-8"> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"> <link href="css/bootstrap-table.css" rel="stylesheet" type="text/css"> <link href="css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" href="css/base.css" /> <link rel="stylesheet" href="css/info-mgt.css" /> <style> .tree_left{box-sizing:border-box;overflow-y: auto;width:76%;border: 1px #ccc solid;;border-radius: 6px;margin-right: 1%;margin-left: 90px;height: 400px;} .tree_left_top{margin: 6px} .tree_input input{border: 1px #ccc solid;margin:3px 0 0 10px;border-radius: 4px; } .layui-layer-title{background:url(images/righttitlebig.png) repeat-x;font-weight:bold;color:#46647e; border:1px solid #c1d3de;height: 33px;line-height: 33px;} .tabe_bot label,.right label{width: 70px;text-align: right;font-size: 14px;font-weight: 900;color: #46647e} .l_left{float: left} .tabe_bot input,.tabe_bot select,.right input,.right input{width: 180px;height: 30px;border-radius: 6px;margin:0 20px 0 0;border: none;border: 1px #ccc solid} .tabe_btn{width: 60px;height: 30px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff} .right{width: 39%;border: 1px #c1d3de solid;border-top: none} .right textarea{width: 80%;height: 60px;resize: none;border-radius: 6px;margin-bottom: 20px;border: 1px #ccc solid} .bot_btn{width: 150px;height: 30px;margin: 20px 0 0 40%} .bot_btn .btn{width: 60px;height: 30px;background-color: #68b86c;border: none;border-radius: 6px;color: #fff;margin-right: 15px} .bot_btn .btn1{background-color: #c1d3de;border: none;border-radius: 6px;color: #000;margin-right: 0} </style> <title>角色管理</title> </head> <body onload="change(),Roleload()"> <div class="title"><h2>角色管理</h2></div> <div class="l_left" style="width: 60%;margin-right: 1%"> <div class="query">
最新发布
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值