Nil*_*esh 15 css google-chrome radio-button
在Google Chrome中,单选按钮会在圆圈周围显示不需要的白色背景.这并未按预期在Firefox中显示.
请检查这些图像.

而且她是有问题的页面的直接链接(在Firefox和Chrome中查看) https://my.infocaptor.com/dash/mt.php?pa=hr_dashboard3_503c135bce6f4
我可以申请Chrome的任何CSS技巧吗?
这是 Chrome 中的一个已知错误,没有真正的解决方法。
我目前看到和使用的唯一选项是使用带有复选框图像的精灵表。我做了一个小提琴,用我在互联网上找到的一些随机精灵向您展示它:
HTML:
<div id="show">
<input type="radio" id="r1" name="rr" />
<label for="r1"><span></span>Radio Button 1</label>
<p />
<input type="radio" id="r2" name="rr" />
<label for="r2"><span></span>Radio Button 2</label>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
div#show {
width:100%;
height: 100%;
background:black;
margin: 10px;
padding: 10px;
}
input[type="radio"] {
/* Uncomment this to only see the working radio button */
/* display:none; */
}
input[type="radio"] + label {
color:#f2f2f2;
font-family:Arial, sans-serif;
font-size:14px;
}
input[type="radio"] + label span {
display:inline-block;
width:19px;
height:19px;
margin:-1px 4px 0 0;
vertical-align:middle;
background:url(http://d3pr5r64n04s3o.cloudfront.net/tuts/391_checkboxes/check_radio_sheet.png) -38px top no-repeat;
cursor:pointer;
}
input[type="radio"]:checked + label span {
background:url(http://d3pr5r64n04s3o.cloudfront.net/tuts/391_checkboxes/check_radio_sheet.png) -57px top no-repeat;
}
Run Code Online (Sandbox Code Playgroud)

您可以按照您想要的设计使用单选按钮创建自己的精灵......
希望对您有所帮助,如果您还有其他问题,请告诉我。
——汉内斯
| 归档时间: |
|
| 查看次数: |
6033 次 |
| 最近记录: |