按钮Button

  am-btn-xx(default、primary、secondary、success、warning、danger、link)

  am-radius 圆角按钮

  am-round 椭圆形按钮

  am-active 激活状态

  am-disabled 禁用状态

  按钮尺寸 am-btn-xl  am-btn-lg  am-btn-default  am-btn-sm  am-btn-xs

  am-btn-block 块级显示

  按钮Icon

  am-icon-cog设置  am-icon-shopping-cart购物车  am-icon-spinner am-icon-spi加载中  am-icon-cloud-download下载

 

 

    Code

  行内代码<code></code>

  代码片段<pre></pre>

  代码块高度<pre  class="am-pre-scrollable"> </pre>

  

 

    Form

  块级显示时在容器上添加am-checkbox、am-radio 

  行内显示时在容器上添加am-checkbox-inline、am-radio-inline  

  

  <div class="am-form-group am-form-file">
    <button type="button" class="am-btn am-btn-default am-btn-sm">
    <i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
    <input type="file" multiple>
  </div>

  

  <div class="am-form-group am-form-file">
    <i class="am-icon-cloud-upload"></i> 选择要上传的文件
    <input type="file" multiple>
  </div>

  

  在容器上添加.am-form class,容器里的子元素才会应用Amaze UI定义的样式。  

  圆角表单域 am-form-filed am-radius am-radius

  椭圆表单域 am-form-filed am-round

  给<fieldset>元素添加disabled属性,禁用所有的子元素

  禁用链接 am-disabled

  水平表单 am-form-horizontal

  行内排列 am-form-inline  行内排列的元素并没有设置右边距,默认使用inline-blcok元素的间距,压缩HTML后行内表单元素的右边距会消失,需自行处理。

  表单group元素加上am-form-icon,依赖icon组件

  <form action="" class="am-form am-form-inline">
    <div class="am-form-group am-form-icon">
      <i class="am-icon-calendar"></i>
      <input type="text" class="am-form-field" placeholder="日期">
    </div>

    <div class="am-form-group am-form-icon">
      <i class="am-icon-clock-o"></i>
      <input type="text" class="am-form-field" placeholder="时间">
    </div>
  </form>

 

  验证状态 

  <form action="" class="am-form">
    <div class="am-form-group am-form-success am-form-icon am-form-feedback">
      <label class="am-form-label" for="doc-ipt-success">验证成功</label>
      <input type="text" id="doc-ipt-success" class="am-form-field">
      <span class="am-icon-check"></span>
    </div>
    <div class="am-form-group am-form-warning">
      <label class="am-form-label" for="doc-ipt-warning">验证警告</label>
      <input type="text" id="doc-ipt-warning" class="am-form-field">
    </div>
    <div class="am-form-group am-form-error">
      <label class="am-form-label" for="doc-ipt-error">验证失败</label>
      <input type="text" id="doc-ipt-error" class="am-form-field">
    </div>
  </form>

  带图标的验证:添加am-form-icon和am-form-feedback  

  <form class="am-form">
    <div class="am-form-group am-form-success am-form-icon am-form-feedback">
      <input type="text" class="am-form-field" placeholder="验证成功">
      <span class="am-icon-check"></span>
    </div>
    <div class="am-form-group am-form-warning am-form-icon am-form-feedback">
      <input type="text" class="am-form-field" placeholder="验证警告">
      <span class="am-icon-warning"></span>
    </div>
    <div class="am-form-group am-form-error am-form-icon am-form-feedback">
      <input type="text" class="am-form-field" placeholder="验证失败">
      <span class="am-icon-times"></span>
    </div>
  </form>

  单个域的大小:am-input-lg、am-input-sm

  组大小 在am-form-group的基础上添加了am-form-group-sm和am-form-group-lg,可以实现对表达大小的设置。

  使用am-form-set嵌套一些列<input>元素。

  <div class="am-g">
    <div class="am-u-md-8 am-u-sm-centered">
      <form class="am-form">
        <fieldset class="am-form-set">
          <input type="text" placeholder="取个名字">
          <input type="text" placeholder="设个密码">
          <input type="email" placeholder="填下邮箱">
        </fieldset>
        <button type="submit" class="am-btn am-btn-primary am-btn-block">注册个账号</button>
      </form>
    </div>
  </div>

 

 

  demo

<form class="am-form">
  <fieldset>
  <legend>表单标题</legend>

  <div class="am-form-group">
    <label for="doc-ipt-email-1">邮件</label>
    <input type="email" class="" id="doc-ipt-email-1" placeholder="输入电子邮件">
  </div>

  <div class="am-form-group">
    <label for="doc-ipt-pwd-1">密码</label>
    <input type="password" class="" id="doc-ipt-pwd-1" placeholder="设置个密码吧">
  </div>

  <div class="am-form-group">
    <label for="doc-ipt-file-1">原生文件上传域</label>
    <input type="file" id="doc-ipt-file-1">
    <p class="am-form-help">请选择要上传的文件...</p>
  </div>

  <div class="am-form-group am-form-file">
    <label for="doc-ipt-file-2">Amaze UI 文件上传域</label>
    <div>
      <button type="button" class="am-btn am-btn-default am-btn-sm">
      <i class="am-icon-cloud-upload"></i> 选择要上传的文件</button>
    </div>
    <input type="file" id="doc-ipt-file-2">
  </div>

  <div class="am-checkbox">
    <label>
      <input type="checkbox"> 复选框,选我选我选我
    </label>
  </div>  

  <div class="am-radio">
    <label>
      <input type="radio" name="doc-radio-1" value="option1" checked>
      单选框 - 选项1
    </label>
  </div>

  <div class="am-radio">
    <label>
      <input type="radio" name="doc-radio-1" value="option2">
        单选框 - 选项2
    </label>
  </div>

  <div class="am-form-group">
    <label class="am-checkbox-inline">
      <input type="checkbox" value="option1"> 选我
    </label>
    <label class="am-checkbox-inline">
      <input type="checkbox" value="option2"> 同时可以选我
    </label>
    <label class="am-checkbox-inline">
      <input type="checkbox" value="option3"> 还可以选我
    </label>
   </div>

  <div class="am-form-group">
    <label class="am-radio-inline">
      <input type="radio" value="" name="docInlineRadio"> 每一分
    </label>
    <label class="am-radio-inline">
      <input type="radio" name="docInlineRadio"> 每一秒
    </label>
    <label class="am-radio-inline">
      <input type="radio" name="docInlineRadio"> 多好
    </label>
  </div>

  <div class="am-form-group">
    <label for="doc-select-1">下拉多选框</label>
    <select id="doc-select-1">
      <option value="option1">选项一...</option>
      <option value="option2">选项二.....</option>
      <option value="option3">选项三........</option>
    </select>
    <span class="am-form-caret"></span>
  </div>

  <div class="am-form-group">
    <label for="doc-select-2">多选框</label>
    <select multiple class="" id="doc-select-2">
      <option>1</option>
      <option>2</option>
      <option>3</option>
      <option>4</option>
      <option>5</option>
    </select>
  </div>

  <div class="am-form-group">
    <label for="doc-ta-1">文本域</label>
    <textarea class="" rows="5" id="doc-ta-1"></textarea>
  </div>

  <p><button type="submit" class="am-btn am-btn-default">提交</button></p>
</fieldset>
</form>

 

 

    图片

  响应式图片 am-img-responsive

  圆角图片 am-radius

  椭圆角图片 am-round

  圆形  am-cricle

  边框 am-img-thumbnail

  

 

    表格(am-table)

  基本边框 am-table-bordered

  圆角边框 am-table-bordered am-table-radius 外层圆角边框通过box-shadow实现

  单元格状态 am-active(激活状态) am-disabled(禁用) am-primary(蓝色高亮) am-success(绿色高亮) am-warning(橙色高亮) am-danger(红色高亮)

  斑马纹效果 am-table-striped

  状态 am-table-hover

  紧凑 am-table-compact 调整padding显得单元格更紧凑

  响应式表格 am-text-nowrap(禁止文字换行)  am-scrollable-horizontal(内容超出容器宽度时显示水平滚动条)

  单元格水平居中对齐 am-table-centered

  单元格中文字垂直居中对齐 am-text-middle