【问题标题】:Install only form controls styles from Bootstrap 4?仅从 Bootstrap 4 安装表单控件样式?
【发布时间】:2018-03-29 22:45:38
【问题描述】:

有没有办法只安装 Bootstrap 4 中的表单控件样式(输入组等)?

我找到了一个只能安装Bootstrap 4 Grid 的资源。是否有类似的资源仅用于安装表单样式?

【问题讨论】:

    标签: html css twitter-bootstrap sass bootstrap-4


    【解决方案1】:

    将css作为boostrap的表单样式。例如表单控件样式。

    .form-control {
        display: block;
        width: 100%;
        height: 36px;
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.6;
        color: #555555;
        background-color: #fff;
        background-image: none;
        border: 1px solid #ccd0d2;
        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 0.15s, box-shadow ease-in-out 0.15s;
        -webkit-transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
        transition: border-color ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
        transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
        transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s, -webkit-box-shadow ease-in-out 0.15s;
    }
    

    当然,您需要为 .js 验证做一些额外的工作,但嘿,这是一种解决方案。

    【讨论】:

      猜你喜欢
      • 2020-05-22
      • 1970-01-01
      • 2018-04-20
      • 2020-02-07
      • 1970-01-01
      • 2018-10-29
      • 1970-01-01
      • 2017-04-14
      • 1970-01-01
      相关资源
      最近更新 更多