bootstrap 之 CSS样式

来源:互联网 发布:杭州软件app 编辑:程序博客网 时间:2024/04/29 22:04


定制表单控件的大小

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <label> <input class="input-sm" type="text" placeholder=".input-sm"> </label>  
  2. <label> <input class="input-lg" type="text" placeholder=".input-lg"> </label>  

不可编辑的样式

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <input class="span4 uneditable-input" disabled type="text" placeholder=".span4">  
  2. <span class="span4 uneditable-input">default</span>  

定制帮助文本

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <input type="text"><span class="help-inline">行内解释文本</span>  
  2. <input type="text"><span class="help-block">块解释文本</span>  

定制表单行为

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <form class="form-actions" action="">  
  2.     <label>  
  3.         <input type="text" id="userName">  
  4.     </label>  
  5.     <label>  
  6.         Password:  
  7.         <input type="password" id="userPsw">  
  8.     </label>  
  9.     <button type="button" class="btn">取消</button>  
  10.     <button type="submit" class="btn btn-primary">确定登录</button>  
  11. </form>  

验证状态

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <div class="control-group warning">  
  2.     <label>用户名  
  3.         <input type="text" id="user">  
  4.         <span class="help-inline">非法用户名</span>  
  5.     </label>  
  6. </div>  

按钮样式

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <a href="" class="btn">super</a>  
  2. <button class="btn">btn</button>  
  3. <input class="btn" type="button" value="input">  
  4. <input class="btn" type="submit" value="submit">  

禁用按钮

[html] view plaincopy在CODE上查看代码片派生到我的代码片
  1. <button type="button" class="btn btn-default btn-lg disabled" disabled="disabled">Button</button>  
可以使用第三方专为Bootstrap设计的图标字体,如Font Awesome,在页面中引入相应的CSS文件即可使用
0 0
原创粉丝点击