.chk-circle {
\t width: 8px;
\t height: 8px;
\t background: #afb0b5;
\t border-radius: 100%;
\t position: relative;
\t float: left;
\t margin-top: 4px;
\t margin-right: 8px;
}
.chk-circle label {
\t display: block;
\t width: 4px;
\t height: 4px;
\t border-radius: 100px;
\t cursor: pointer;
\t position: absolute;
\t top: 2px;
\t left: 2px;
\t z-index: 1;
\t background: #fff;
}
.chk-hide {
visibility: hidden;
}
.chk-circle input[type=checkbox]:checked + label {
\t background: #63a70a;
}
\t <div class="chk-circle">
<input class="chk-hide" type="checkbox" id="chk1"/>
\t <label for="chk1"></label>
\t </div>
背景顏色將會產生如下:
我想要做的是有外圓變綠時輸入檢查,我已經嘗試了以下但發生相反:
嘗試添加顏色的邊界? – weinde
不要濫用那樣的'標籤'。對於您顯示的示例,標籤元素應包含複選框旁邊寫的文本。 – CBroe