css – 单选按钮在Chrome中显示不需要的白色背景. Firefox很好

栏目: CSS · 发布时间: 6年前

内容简介:http://stackoverflow.com/questions/12151523/radio-buttons-show-unwanted-white-background-in-chrome-firefox-is-fine

在Google Chrome中,单选按钮会在圆圈上显示不需要的白色背景. Firefox未按预期显示.

请检查这些图像.

而她是有问题页面的直接链接(检查Firefox和Chrome)

https://my.infocaptor.com/dash/mt.php?pa=hr_dashboard3_503c135bce6f4

任何可以申请Chrome的CSS技巧?

这是Chrome的 known

错误,没有真正的解决方法.

在这个时间点我看到和使用的唯一选项是使用带有复选框图像的精灵图.我用一个小提琴向我显示一些我在互联网上发现的随机精灵:

Workaround

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>

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;
}

您可以使用您想要的设计中的单选按钮创建自己的精灵…

希望有帮助,如果您还有其他问题,请通知我.

-Hannes

http://stackoverflow.com/questions/12151523/radio-buttons-show-unwanted-white-background-in-chrome-firefox-is-fine


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

长尾理论

长尾理论

[美]克里斯•安德森 (Chris Anderson) / 乔江涛、石晓燕 / 中信出版社 / 2012 / 68.00元

网络经济正如火如荼地发展着,长尾理论无疑成为当代商务人士最为关注的焦点之一。不论是关于长尾理论的溢美还是论战,都代表了其备受关注的程度。 《长尾理论》是克里斯•安德森对这些争论的最明确的回答。在书中,他详细阐释了长尾的精华所在,指出商业和文化的未来不在于传统需求曲线上那个代表“畅销商品”的头部,而是那条代表“冷门商品”的经常被人遗忘的长尾。他还揭示了长尾现象是如何从工业资本主义原动力——规模......一起来看看 《长尾理论》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具