基础表单
 
<form role="form">
    <div class="form-group">
        <label>email</label>
        <input type="email" class="form-control" placeholder="user">
    </div>
</form>
内联表单
 
<form role="form" class="form-inline">
    <div class="form-group">
        <label>email</label>
        <input type="email" class="form-control" placeholder="user">
    </div>
    <div class="form-group">
        <lable>密码</lable>
        <input type="password" class="form-control" placeholder="password">
    </div>
    <div class="form-group">
        <lable class="sr-only">选择文件</lable>
        <input type="file">
        <p class="help-block">选择你需要上传的文件</p>
    </div>
</form>
水平排列的表单
 
<form role="form" class="form-horizontal">
    <div class="form-group">
        <lable class="col-sm-2 control-label">Email</lable>
        <div class="col-sm-10">
            <input type="email" class="form-control" placeholder="Email">
        </div>
    </div>
    <div class="form-group">
        <lable class="col-sm-2 control-label">password</lable>
        <div class="col-sm-10">
            <input type="password" class="form-control" placeholder="password">
        </div>
    </div>
表单所支持的控件
 
<input type="text" class="form-control">
<textarea class="form-control" rows="5">hello</textarea>
 
复选框
<div class="checkbox">
     <label>
          <input type="checkbox" value="水果">
          水果
     </label>
</div>
<div class="checkbox">
     <label>
          <input type="checkbox" value="蔬菜">
          蔬菜
     </label>
</div>
不可使用标签
 
<fieldset disabled>
 
</fieldset>
只读的
 
<input class="form-control" type="text" readonly>
不同的状态
 
<form role="form">
     <div class="form-group has-warning">
          <label>用户名</label>
          <input class="form-control" type="text">
     </div>
     <div class="form-group has-success">
          <label>用户名</label>
          <input class="form-control" type="text">
     </div>
     <div class="form-group has-error">
          <label>用户名</label>
          <input class="form-control" type="text">
     </div>  
</form>
通过删格系统进行控制大小,位置
 
bootstrop按钮
 
<div class="container">
    <button type="button" class="btn btn-default">default</button>
    <button type="button" class="btn btn-primary">primary</button>
    <button type="button" class="btn btn-success">success</button>
    <button type="button" class="btn btn-info">info</button>
    <button type="button" class="btn btn-warning">warning</button>
    <button type="button" class="btn btn-link">link</button>
    <button type="button" class="btn btn-danger">dangers</button>
</div>
调整大小
btn-lg    btn-sm    btn-xs
充满父级容器
btn-block
激活状态
active
禁用状态
disabled="disabled"
 
建议使用button
 
bootstrop图片
把图片宽度设为最大化,100%  高度为自适应,图片可能会失真
 
<img src="" alt="" class="img-circle">
<img src="" alt="" class="img-rounded">
<img src="" alt="" class="img-thumbnail">
 
字体图标
基类和字体图标子类
基于一个span标签
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>

bootstrap CSS表单、按钮和字体图标的更多相关文章

  1. bootstrap -- css -- 表单控件

    若干css样式 .form-control { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14p ...

  2. Bootstrap CSS 表单

    表单布局 Bootstrap 提供了下列类型的表单布局: 垂直表单(默认) 内联表单 水平表单 垂直或基本表单 基本的表单结构是 Bootstrap 自带的,个别的表单控件自动接收一些全局样式.下面列 ...

  3. Bootstrap之表单控件状态

    Bootstrap中的表单控件状态主要有三种:焦点状态,禁用状态,验证状态.   一.焦点状态:该状态告诉用户可输入或选择东西 焦点状态通过伪类“:focus”以实现. bootstrap.css相应 ...

  4. CSS表单设计

    今天我们开始学习<十天学会web标准(div+css)>的css表单设计,包含以下内容和知识点: 改变文本框和文本域样式 用图片美化按钮 改变下拉列表样式 用label标签提升用户体验 一 ...

  5. js 节点 document html css 表单节点操作

    js 节点 document html css 表单节点操作 节点操作:访问.属性.创建 (1)节点的访问:firstChild.lastChild.childNodes.parentChild(父子 ...

  6. BootStrap 智能表单系列 六 表单数据绑定(编辑页面的数据绑定)

    本章介绍如何在生成表单后,将一个model的数据展示到form表单中(一般用于编辑页面) 代码如下(连接地址:https://github.com/xiexingen/Bootstrap-SmartF ...

  7. BootStrap 智能表单系列 七 验证的支持

    但凡是涉及到用户编辑信息然后保存的页面,都涉及到一个数据是否符合要求的检查,需要客服端和服务器端的校验的问题: 客服端的校验主要是为了提高用户体验,而服务器端的校验为了数据的合格性 该插件也为您支持到 ...

  8. BootStrap 智能表单系列 四 表单布局介绍

    表单的布局分为自动布局和自定义布局两种: 自动布局就是根据配置项中第二级配置项中数组的长度来自动使用不同的bootstrap栅格,通过设置autoLayout为true可以实现自动布局 自动以布局就是 ...

  9. BootStrap 智能表单系列 三 分块表单配置的介绍

    相信广大博友肯定碰到过一个编辑页面分了很多块的情况,智能表单插件已经为您支持了这种情况, 代码如下(链接地址:https://github.com/xiexingen/Bootstrap-SmartF ...

随机推荐

  1. Zookeeper原理和应用

    ZooKeeper基本原理 数据模型 如上图所示,ZooKeeper数据模型的结构与Unix文件系统很类似,整体上可以看作是一棵树,每个节点称做一个ZNode.每个ZNode都可以通过其路径唯一标识, ...

  2. mysql优化---in型子查询,exists子查询,from 型子查询

    in型子查询引出的陷阱:(扫更少的行,不要临时表,不要文件排序就快) 题: 在ecshop商城表中,查询6号栏目的商品, (注,6号是一个大栏目) 最直观的: mysql); 误区: 给我们的感觉是, ...

  3. vue-router-h5-history

    vue-router的HTML5 History 模式,这种模式充分利用 history.pushState API 来完成 URL 跳转而无须重新加载页面. const router = new V ...

  4. 织梦CMS使用JS实时动态调用评论数

    网站中只要启用了会员系统,网站中的文章就会有评论,在网站首页中调用会员评论也能提升会员体验度,网页都是静态页面,如果每有一个评论都更新html的话就会有点浪费资源了,所以这里给大家分享一个使用JS调用 ...

  5. dict built-in function

    映射类型:字典 字典是无序的,映射类型对象里哈希值和被指向的对象是一对多的关系,字典中的键必须是可哈希的,所有不可变的类型都是可哈希的,另外针对数字键来说,值相等的两个数字是相同的键,例如1和1.0: ...

  6. 一步一步学Silverlight 2系列(10):使用用户控件

    概述 Silverlight 2 Beta 1版本发布了,无论从Runtime还是Tools都给我们带来了很多的惊喜,如支持框架语言Visual Basic, Visual C#, IronRuby, ...

  7. AtCoder3857:Median Sum (Bitset优化背包&&对称性求中位数)

    Median Sum You are given N integers A1, A2, ..., AN. Consider the sums of all non-empty subsequences ...

  8. AJAX路径问题

    如果发AJAX请求,看发送请求消息的路径,如果看到报404的错,而这个 时候看下发送头部的路径,如果看到%20,这个时候有可能就是写路劲的时候,不小心按了一个空格

  9. 【旧文章搬运】获取并修改PEB中的映像路径,命令行和当前目录

    原文发表于百度空间,2008-7-24 当时对UNICODE_STRING的使用还有点问题,导致最终效果图中字符串被截断了======================================= ...

  10. 02_使用httpurlconnection提交参数_get