2016-11-25 92 views
0

我正面臨一個問題。我有四個單選按鈕,但我用複選框更改了它的外觀。他們實際上是單選按鈕,但看起來像複選框。問題出在谷歌瀏覽器中。但在Firefox中正確工作 任何人都可以幫助我。這裏是我的代碼: -如何刪除複選框中的行?

input[type="radio"].custom-radio { 
 
    -webkit-appearance: checkbox; 
 
    -moz-appearance: checkbox; 
 
    -ms-appearance: checkbox;  /* not currently supported */ 
 
    -o-appearance: checkbox;  /* not currently supported */ 
 
}
<span class="text_part_class-2"> 
 
<span class="radio secondpart"> 
 
<input type="radio" value="Business for Sale" class="custom-radio" name="lastservice"> 
 
</span>
enter image description here

如何從單選按鈕刪除線,但看起來像複選框。在此先感謝

+4

[CHROME HTML無線電覆選框顯示減號(可能的重複http://stackoverflow.com/questions/27437414/chrome-html -radio-to-checkbox-showing-minus-sign) –

回答

0

試試這個:

input[type="radio"].custom-radio { 
-webkit-appearance: radio; 
-moz-appearance: radio; 
-ms-appearance: radio;  /* not currently supported */ 
-o-appearance: radio;  /* not currently supported */ 

}

+0

我想單選按鈕看起來像複選框你的CSS改變我的複選框到收音機請提供更好的解決方案 – kunal

+0

在這個鏈接,你可以找到其他的解決方案:http:// stackoverflow。 com/questions/279421/can-you-style-an-html-radio-button-like-look-like-a-checkbox – NMenam

+0

根本不工作 – kunal

相關問題