使用Bootstrap3将表单CSS应用于所有输入,而不使用类

使用Bootstrap3将表单CSS应用于所有输入,而不使用类,css,styles,twitter-bootstrap-3,Css,Styles,Twitter Bootstrap 3,如何使用Bootstrap 3在没有类表单控件的情况下将相同的样式应用于所有表单元素(输入、选择、文本区域) 使用窗体控件类“我想要的” 红色箭头无CSS== input[type = "any"]{background-color: #FFFFFF;background-image: none;border: 1px solid #CCCCCC;border-radius: 4px;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;color:

如何使用Bootstrap 3在没有类
表单控件的情况下将相同的样式应用于所有表单元素(输入、选择、文本区域)

使用
窗体控件
类“我想要的”

红色箭头无CSS==

input[type = "any"]{background-color: #FFFFFF;background-image: none;border: 1px solid #CCCCCC;border-radius: 4px;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;color: #555555;display: block;font-size: 14px;height: 34px;line-height: 1.42857;padding: 6px 12px;transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;width: 100%;}input, button, select, textarea {font-family: inherit;font-size: inherit;line-height: inherit;}input {line-height: normal;}button,input, optgroup, select, textarea {color: inherit;font: inherit;margin: 0;}

如果您使用更少或更少的SAS,您只需扩展 所有输入上的表单控件


对于普通CSS,您可以从表单控件复制样式并粘贴到输入{}

我的意思是将“表单控件”CSS应用到所有表单元素,而无需将类名添加到这些元素(包括:焦点、禁用、只读)如何使用较少的资源在所有输入上扩展表单控件?
input:-moz-placeholder, select:-moz-placeholder, textarea:-moz-placeholder {
    color: #999999;
}

input::-moz-placeholder, select::-moz-placeholder, textarea::-moz-placeholder {
    color: #999999;
}

input:-ms-input-placeholder ,select:-ms-input-placeholder, textarea:-ms-input-placeholder {
    color: #999999;
}

input::-webkit-input-placeholder, select::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
    color: #999999;
}

input, select, textarea {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.428571429;
  color: #555555;
  vertical-align: middle;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border-radius: 4px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.input[disabled],
input[readonly] {
  cursor: not-allowed;
  background-color: #eeeeee;
}

textarea {
  height: auto;
}