Jquery primefaces收音机按钮的圆角

Jquery primefaces收音机按钮的圆角,jquery,jsf-2,primefaces,Jquery,Jsf 2,Primefaces,当使用单选按钮时,在IE 8中避免拐角问题的正确用法是什么? 例如 我的数据表中有 在IE 8中,单选按钮呈现为复选框,复选框位于方形框中。所以为了解决这个问题,我使用了 <h:outputScript library="primefaces" name="jquery/jquery.js"> $(document).ready(function() { $('rad').corner(); }); </h:outputScript>

当使用单选按钮时,在IE 8中避免拐角问题的正确用法是什么? 例如

我的数据表中有

在IE 8中,单选按钮呈现为复选框,复选框位于方形框中。所以为了解决这个问题,我使用了

<h:outputScript library="primefaces" name="jquery/jquery.js">
$(document).ready(function() {
          $('rad').corner();      
    });
</h:outputScript>

$(文档).ready(函数(){
$('rad').corner();
});
然而,这并没有解决问题

那么,单选按钮圆角的正确方法是什么

谢谢

编辑1

<h:head>

<style type="text/css">
   <![CDATA[


      .radio input 
{
    position: absolute;
    left: -9999px;
}

.label_radio 
{
    background: url("/radio_labels.jpg") no-repeat scroll 0 0 transparent;
    height: 1em;
    width: 1em;
}

.label_radio.r_on 
{
    background-position: 0 -18px;
}

.radio label 
{
    display: inline;
    padding-bottom: 0.1em;
    padding-right: 1.9em;
}


   ]]>
</style>
</h:head>


<h:outputScript>
    $(document).ready(function() {
    alert("1");
    $('.rad label').addClass('label_radio');
if ($('.rad input').length) {
    $('.rad input').each(function () {
        $(this).next('label').removeClass('r_on');
    });
    $('.rad input:checked').each(function () {
        $(this).next('label').addClass('r_on');
    });
};

    });
</h:outputScript>

$(文档).ready(函数(){
警报(“1”);
$('.rad label').addClass('label_radio');
if($('.rad输入').length){
$('.rad输入')。每个(函数(){
$(this).next('label').removeClass('r_on');
});
$('.rad输入:选中')。每个(函数(){
$(this).next('label').addClass('r_on');
});
};
});
和数据表中的单选按钮

<p:column  id="rad" selectionMode="single"  />

我就是这样做的:

CSS:

.radio input 
{
    position: absolute;
    left: -9999px;
}

.label_radio 
{
    background: url("images/buttons/radio_labels.jpg") no-repeat scroll 0 0 transparent;
    height: 1em;
    width: 1em;
}

.label_radio.r_on 
{
    background-position: 0 -18px;
}

.radio label 
{
    display: inline;
    padding-bottom: 0.1em;
    padding-right: 1.9em;
}
$('.address_type label').addClass('label_radio');
if ($('.address_type input').length) {
    $('.address_type input').each(function () {
        $(this).next('label').removeClass('r_on');
    });
    $('.address_type input:checked').each(function () {
        $(this).next('label').addClass('r_on');
    });
};
<div class="address_type clear width">
<span class="radio twelvepx">
<input id="rbDelAddr" type="radio" value="0" name="AddrType">
<label class="label_radio" for="rbDelAddr">Delivery Address</label>
</span>
<span class="radio twelvepx">
<input id="rbInvAddr" type="radio" value="-1" name="AddrType">
<label class="label_radio" for="rbInvAddr">Billing Address</label>
</span>
</div>
jQuery:

.radio input 
{
    position: absolute;
    left: -9999px;
}

.label_radio 
{
    background: url("images/buttons/radio_labels.jpg") no-repeat scroll 0 0 transparent;
    height: 1em;
    width: 1em;
}

.label_radio.r_on 
{
    background-position: 0 -18px;
}

.radio label 
{
    display: inline;
    padding-bottom: 0.1em;
    padding-right: 1.9em;
}
$('.address_type label').addClass('label_radio');
if ($('.address_type input').length) {
    $('.address_type input').each(function () {
        $(this).next('label').removeClass('r_on');
    });
    $('.address_type input:checked').each(function () {
        $(this).next('label').addClass('r_on');
    });
};
<div class="address_type clear width">
<span class="radio twelvepx">
<input id="rbDelAddr" type="radio" value="0" name="AddrType">
<label class="label_radio" for="rbDelAddr">Delivery Address</label>
</span>
<span class="radio twelvepx">
<input id="rbInvAddr" type="radio" value="-1" name="AddrType">
<label class="label_radio" for="rbInvAddr">Billing Address</label>
</span>
</div>
HTML:

.radio input 
{
    position: absolute;
    left: -9999px;
}

.label_radio 
{
    background: url("images/buttons/radio_labels.jpg") no-repeat scroll 0 0 transparent;
    height: 1em;
    width: 1em;
}

.label_radio.r_on 
{
    background-position: 0 -18px;
}

.radio label 
{
    display: inline;
    padding-bottom: 0.1em;
    padding-right: 1.9em;
}
$('.address_type label').addClass('label_radio');
if ($('.address_type input').length) {
    $('.address_type input').each(function () {
        $(this).next('label').removeClass('r_on');
    });
    $('.address_type input:checked').each(function () {
        $(this).next('label').addClass('r_on');
    });
};
<div class="address_type clear width">
<span class="radio twelvepx">
<input id="rbDelAddr" type="radio" value="0" name="AddrType">
<label class="label_radio" for="rbDelAddr">Delivery Address</label>
</span>
<span class="radio twelvepx">
<input id="rbInvAddr" type="radio" value="-1" name="AddrType">
<label class="label_radio" for="rbInvAddr">Billing Address</label>
</span>
</div>

送货地址
帐单地址

图像是迄今为止在IE中获得圆角的最佳解决方案:)
地址类型
可以替换为
rad
?我在哪里可以找到
radio\u labels.jpg
你可以用你想要的任何东西替换
address\u type
,因为它只是一个类名。你可以自己创建
radio_labels.jpg
图像,也可以在谷歌图像等网站上找到。我的做法与你刚才提到的一模一样,但我仍然将单选按钮视为方形框。还有什么我需要修改的吗?添加了
HTML
示例以更加清晰。如果您仍然使用此行
$('rad').corner(),可能会看到方形框?通过编辑我的问题,我已将修改后的代码包含为“编辑1”。