0
我設計了我的複選框,出於某種原因,我無法將文本左側的框放在頂部。我已經嘗試使用浮動內聯塊沒有任何工作。我能夠將文本浮動的權利,但它把框和文本之間有很大的差距將複選框對齊到左側
.regular-checkbox {
\t display: none;
}
.regular-checkbox + label {
\t background-color: #f0f0ee;
\t border: 1px solid #dcdcda;
\t box-shadow: none;
\t padding: 9px;
\t border-radius: 0px;
\t display: inline-block;
\t position: relative;
}
.regular-checkbox + label:active, .regular-checkbox:checked + label:active {
\t box-shadow: none; \t
}
.regular-checkbox:checked + label {
\t background-color: #f0f0ee;
\t border: 1px solid #dcdcda;
\t box-shadow: none;
\t color: #99a1a7;
}
.regular-checkbox:checked + label:after {
\t content: '\2714';
\t font-size: 15px;
\t position: absolute;
\t top: -4px;
\t left: 3px;
\t color: #99a1a7;
}
.tag {
\t position: relative;
\t top: 0px;
\t display: block;
\t float: left;
\t font-size: 13px;
\t color: #000;
}
<div class="large-12 columns">
\t \t <div>
\t \t \t <div class="tag">Box 1</div>
\t \t \t <input type="checkbox" id="checkbox-1-1" class="regular-checkbox"><label for="checkbox-1-1"></label>
\t \t </div>
\t \t <div>
\t \t \t <div class="tag">Box 2</div>
\t \t \t <input type="checkbox" id="checkbox-2-1" class="regular-checkbox"><label for="checkbox-2-1"></label>
\t \t </div>
\t </div>