繁体   English   中英

为什么我的 HTML 复选框在移动设备上不起作用?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM