css 重力形成fontawesome复选框css

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 重力形成fontawesome复选框css相关的知识,希望对你有一定的参考价值。


/* checkboxes */
.checkboxer>.gfield_label {
    display: inline-block !important;
    padding-left: 15px !important;
    width: calc(100% - 30px) !important;
    float: right;
}
.gfield_checkbox, .gfield_checkbox li, .ginput_container_checkbox {
    width: auto !important;
    display: inline-block;
    margin: 0 !important;
}
.gfield_checkbox li label {
    width: 30px !important;
    height: 30px !important;
}

.gform_wrapper .gfield_checkbox li label {
    max-width: 100% !important;
}

.gfield_checkbox li label:before {
    content: "";
    font-family: Fontawesome;
    display: block;
    position: absolute;
    z-index: 1;
    -webkit-transition: all 100ms;
    transition: all 100ms;
    width: 30px !important;
    height: 30px !important;
    color: #5cb85c;
    border: 1px solid #333;
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
}

.gform_wrapper input[type="checkbox"] {
    opacity: 0;
    outline: none;
    z-index: 100;
    width: 30px !important;
    height: 30px !important;
    top: 0;
    left: 0;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute;
    -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
    cursor: pointer;
    border: 1px solid #333;
}
.gform_wrapper input[type="checkbox"] + label {
    cursor: pointer;
    color: white;
    background: white;
}
.gform_wrapper input[type="checkbox"]:checked + label:before {
    content: "\f00c";
    font-family: Fontawesome;
    display: block;
    position: absolute;
    z-index: 1;
    -webkit-transition: all 100ms;
    transition: all 100ms;
    width: 30px !important;
    height: 30px !important;
}

以上是关于css 重力形成fontawesome复选框css的主要内容,如果未能解决你的问题,请参考以下文章

scss 重力形成初学者CSS

scss 重力形成css

css 重力特权// GP限制选择//隐藏禁用选择(广播和复选框)

如何使用 Font Awesome 设置 CSS 复选框的样式

为什么我的重力形式复选框和标签不对齐?

css [css:没有fontawesome的三角形] #css