海信bcd 212tdag a j-212TDAG/A-J 电脑冰箱故障码DF 蜂鸣器不断报警 冷藏室门开关无效是啥问题?

网页设计教程与开发
提供各种常见网页效果
提供各种各样的设计教程
装扮QQ,让QQ变得更酷
设计参考,提高自升水平
学习服务器和操作系统
提供各种素材和工具
收藏学习资料
您现在的位置:&&>>&&>>&&>>&&>>&正文
Bootstrap三种表单布局的使用方法
Bootstrap提供了三种表单布局:垂直表单,内联表单和水平表单
&创建垂直或基本表单:
&•?向父 &form& 元素添加 role="form"。
&•?把标签和控件放在一个带有 class .form-group 的 &div& 中。这是获取最佳间距所必需的。
&•?向所有的文本元素 &input&、&textarea& 和 &select& 添加 class .form-control
&form role="form"&
&div class="form-group"&
&label for="name"&名称&/label&
&input type="text" class="form-control" id="name"
placeholder="请输入名称"&
&div class="form-group"&
&label for="inputfile"&文件输入&/label&
&input type="file" id="inputfile"&
&p class="help-block"&这里是块级帮助文本的实例。&/p&
&div class="checkbox"&
&input type="checkbox"& 请打勾
&button type="submit" class="btn btn-default"&提交&/button&
内联表单:
&内联表单中所有元素都向左对齐,标签并排,要创建内联表单,需要在form标签中加入class.form-inline
&form class="form-inline" role="form"&
&div class="form-group"&
&label class="sr-only" for="name"&名称&/label&
&input type="text" class="form-control" id="name"
placeholder="请输入名称"&
&div class="form-group"&
&label class="sr-only" for="inputfile"&文件输入&/label&
&input type="file" id="inputfile"&
&div class="checkbox"&
&input type="checkbox"& 请打勾
&button type="submit" class="btn btn-default"&提交&/button&
显示效果如下:
注意:默认情况下,Bootstrap 中的 input、select 和 textarea 有 100% 宽度。在使用内联表单时,需要在表单控件上设置一个宽度。&
水平表单:和其它两种表单有所不同,要创建水平表单需要遵循以下步骤.
&•向父 &form& 元素添加 class .form-horizontal。
&•把标签和控件放在一个带有 class .form-group 的 &div& 中。
&•向标签添加 class .control-label。
&form class="form-horizontal" role="form"&
&div class="form-group"&
&label for="firstname" class="col-sm-2 control-label"&名字&/label&
&div class="col-sm-10"&
&input type="text" class="form-control" id="firstname"
placeholder="请输入名字"&
&div class="form-group"&
&label for="lastname" class="col-sm-2 control-label"&姓&/label&
&div class="col-sm-10"&
&input type="text" class="form-control" id="lastname"
placeholder="请输入姓"&
&div class="form-group"&
&div class="col-sm-offset-2 col-sm-10"&
&div class="checkbox"&
&input type="checkbox"& 请记住我
&div class="form-group"&
&div class="col-sm-offset-2 col-sm-10"&
&button type="submit" class="btn btn-default"&登录&/button&
显示效果如下:
转载请注明:破洛洛(谢谢合作)
上一篇文章: 下一篇文章:
网友评论:
[][][][][][][][][][]> 博客详情
用js控制bootstrapTable的高度有几种方法
&table class="table-striped qiliangqifei-tab" id="qiliangqifei"&
&th data-valign="middle" &气费年月&/th&
&th&当期气量 &/br & Sm&sup&3&/sup&&/th&
&th&当期气费 &/br &(元)&/th&
&td&2016-12&/td&
&td&100&/td&
&td&100&/td&
&td&2016-10&/td&
&td&100&/td&
&td&100&/td&
&script type="text/javascript"&
$(document).ready( function (){
$( '#qiliangqifei' ).bootstrapTable( { height: 260 } );
&table class="table-striped " data-toggle="table" data-height="350" id="qiliangqifei"&
&th data-valign="middle" &气费年月&/th&
&th&当期气量 &/br & Sm&sup&3&/sup&&/th&
&th&当期气费 &/br &(元)&/th&
&td&2016-12&/td&
&td&100&/td&
&td&100&/td&
&td&2016-10&/td&
&td&100&/td&
&td&100&/td&
&script type="text/javascript"&
$('#qiliangqifei').bootstrapTable({height:$(window).height()-120});
两者的区别是table元素中第二种方法是含有data-toggle="table" 及data-height="350",js调用时不要写
$(document).ready(回调函数)
&table class="table-striped " data-toggle="table" data-height="350"
id="qiliangqifei"&
&th data-valign="middle" &气费年月&/th&
&th&当期气量 &/br & Sm&sup&3&/sup&&/th&
&th&当期气费 &/br &(元)&/th&
&td&2016-12&/td&
&td&100&/td&
&td&100&/td&
&td&2016-10&/td&
&td&100&/td&
&td&100&/td&
&script type="text/javascript"&
$(document).ready( function (){
$( '#qiliangqifei' ).bootstrapTable('resetView',{ height: 260 } );
如果有$(document).ready(回调函数),需要加上"resetView" 否则不起作用
如果我们根据table里面的内容来确定container的高度,当内容的高度大于窗口的高度就有滚动条,当内容的高度小于窗口的高度,container的高度设置为内容的高度
完整的js如下:
$(document).ready( function (){
//设置bootstrapTable起始的高度
$('#tableTest1').bootstrapTable({height:$(window).height()-120});
//当表格内容的高度小于外面容器的高度,容器的高度设置为内容的高度,相反时容器设置为窗口的高度-160
if($(".fixed-table-body table").height()&$(".fixed-table-container").height()){
$(".fixed-table-container").css({"padding-bottom":"0px",height:$(".fixed-table-body table").height()+20});
// 是当内容少时,使用搜索功能高度保持不变
$('#tableTest1').bootstrapTable('resetView',{height:"auto"});
$(".fixed-table-container").css({height:$(window).height()-160});
人打赏支持
码字总数 27171
支付宝支付
微信扫码支付
打赏金额: ¥
已支付成功
打赏金额: ¥

我要回帖

更多关于 海信邮箱登录 的文章

 

随机推荐