btn.css 2.37 KB
/***************************************************
* feature  :  按钮,默认提供3种样式;
* update   :  2015/02/03;
* use      :  .m-btn;
* extend   :  .btn-*;
* example  :  ;
* desc     :  ;
* feedback :  此处填入 issue, 并请附带以下信息[os_version, browser_version, page_path, issue_description]
*          -  demo => [windows 7, IE 8, http://diligrp.com/icon.html, 在不定height下未能垂直居中];
****************************************************/
.m-btn,
a.m-btn {
  display: inline-block;
  padding: 0 15px;
  line-height: 35px;
  font-size: 15px;
  color: #FFF;
  text-align: center;
  background-color: #1c69a3;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  cursor: pointer;
  vertical-align: middle;
  min-width: 68px;
  position: relative;
  border: none;
}
.m-btn:after,
a.m-btn:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  border: 1px solid #1c69a3;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 200%;
  height: 200%;
  -webkit-transform: scale(0.5);
  transform: scale(0.5);
  -webkit-transform-origin: left top;
  transform-origin: left top;
  border-radius: 6px;
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
}
.m-btn.btn-large,
a.m-btn.btn-large {
  font-size: 19px;
  line-height: 43px;
}
.m-btn.btn-default,
a.m-btn.btn-default {
  color: #333;
  background-color: #FFF;
}
.m-btn.btn-default:after,
a.m-btn.btn-default:after {
  border-color: #e2e2e2;
}
.m-btn.btn-success,
a.m-btn.btn-success {
  color: #FFF;
  background-color: #6C2;
  border: none;
}
.m-btn.btn-success.reverse,
a.m-btn.btn-success.reverse {
  background-color: #FFF;
  color: #6C2;
  line-height: 43px;
}
.m-btn.btn-success.reverse:after,
a.m-btn.btn-success.reverse:after {
  border-color: #6C2;
}
.m-btn.btn-warning,
a.m-btn.btn-warning {
  color: #FFF;
  background-color: #ff9d2c;
  border: none;
}
.m-btn.btn-danger,
a.m-btn.btn-danger {
  color: #FFF;
  background-color: #fa4535;
  border: none;
}
.m-btn.btn-text,
a.m-btn.btn-text {
  background: none;
  border: 1px solid #6c2;
  color: #6c2;
  width: 65px;
  font-size: 12px;
  text-align: center;
  line-height: 23px;
  padding: 0;
  float: right;
  border-radius: 2px;
  margin-top: -2px;
}
.m-btn.disabled,
a.m-btn.disabled {
  background-color: #e2e2e2;
  color: #999;
}
.m-btn.disabled:after,
a.m-btn.disabled:after {
  border-color: #e2e2d2;
}