5
我使用下面提及的CSS展現對自定義單選按鈕自定義單選按鈕的iOS Safari瀏覽器不可見
input[type=radio]{
display:none;
}
.radio-options label::before {
content: "\2b24";
color:#e2e2e2;
display: inline-block !important;
width: 17px;
height: 17px;
vertical-align:middle;
margin-right: 8px;
background-color: #fff;
border: 1px solid #e2e2e2;
border-radius: 8px;
font-size: 9px;
text-align: center;
text-shadow: 0px 0px 3px #fff;
font-family: monospace;
padding-top: 1.8px;
line-height: 10px;
cursor: pointer;
}
.radio-options label.active-radio::before {
content: "\2b24";
color: #f9b410;
background-color: #fff;
font-size: 9px;
text-align: center;
text-shadow: 0px 0px 3px #fff;
font-family: monospace;
margin-left: 0px;
padding-top: 1.8px;
line-height: 10px;
}
<div class="radio-options">
<div class="col-md-6 col-xs-6">
<input id="some_thing" type="radio" >
<label ng-class="{'active-radio':true}">Something</label >
</div>
</div>
任何建議可能是什麼原因?
嘿, 你找到你的問題的解決方案?我現在有同樣的問題,找不到原因。謝謝。 – alanbartczak
不,相反,我使用精靈和活動類使用背景圖像來模仿單選按鈕的功能(切換狀態設置類和更改背景圖像);) – icanbeacoder
這可能是因爲定位問題。嘗試添加一個相對於您的標籤的位置,然後將您的僞元素放在絕對位置。當有活動課時,不要忘記放置一個顯示器。 –