[英]Why doesn't my HTML checkbox work on mobile devices?
我有一個網站,但我的用戶無法在移動設備上單擊我的復選框。 我在網上搜索過,找不到解決此問題的方法。
.jg-c-register_label { display: grid; } .jg-c-register_label-text { color: #001e4b; margin-bottom: 15px; }
<label class="jg-c-register_label"> <span class="jg-c-register_label-text" style="margin-bottom: -5px; padding-top: 10px;"> <input type="checkbox" id="giftAid" name="giftAid" style="-webkit-appearance: auto;display: inline-block;"> I am a UK Tax Payer. I want to Gift Aid this donation and any future donation I make on this platform until further notice. </span> </label>
替換-webkit-appearance: auto;
帶有-webkit-appearance: checkbox;
對於復選框。 它應該工作。
該復選框也不適用於我的桌面。
PS:你為什么要放-webkit-appearance: none;
並display: none
當您沒有自定義 css 復選框時, display: none
種類的 css 屬性。 此外,您的代碼中有很多重復的 css。 你的 default.css、global.css、normalize.css 有相同的代碼行......為什么......????
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.