问题描述
是否有一种简单的方法可以为复选框列表修复此弯曲的渲染?
此代码:
<?= $form->field($model,'targeting_gender')->checkBoxList(['Male'=>'Male','Female'=>'Female','UnkNown'=>'UnkNown']) ?>
最终如下:
问题在于标签的不同长度。
以下是一些CSS复选框:
type="checkBox"]:not(:checked),[type="checkBox"]:checked {
position: absolute;
opacity: 0;
pointer-events: none;
}
[type="checkBox"],[type="radio"] {
-webkit-Box-sizing: border-Box;
Box-sizing: border-Box;
padding: 0;
}
input[type="checkBox" i] {
background-color: initial;
cursor: default;
appearance: checkBox;
Box-sizing: border-Box;
margin: 3px 3px 3px 4px;
padding: initial;
border: initial;
}
input {
-webkit-writing-mode: horizontal-tb !important;
text-rendering: auto;
color: -internal-light-dark(black,white);
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
appearance: textfield;
background-color: -internal-light-dark(rgb(255,255,255),rgb(59,59,59));
-webkit-rtl-ordering: logical;
cursor: text;
margin: 0em;
font: 400 13.3333px Arial;
padding: 1px 2px;
border-width: 2px;
border-style: inset;
border-color: -internal-light-dark(rgb(118,118,118),rgb(195,195,195));
border-image: initial;
}
PS:我正在使用materializecss