2011-10-05 152 views
3

您好,我正在尝试改变一些uls的特定角落的边界半径与jquery排序方法。JQuery的css边框半径特定的角半径?

这是我的代码到目前为止,它不工作,有什么想法?

sort: function() { 
    var borderSet = $('#fluidWrap ul:last-child').attr('id'); 
    if (borderSet == 'sideWrap') { 

     $('#sideWrap ul').css({BorderTopRightRadius: 10, BorderBottomRightRadius: 10}); 
    } 
    else { 
     $('#sideWrap ul').css({BorderTopLeftRadius: 10, BorderBottomLeftRadius: 10}); 
    } 
} 
+1

确定你不必提单位,我说10 px代替。 – defau1t

回答

5

你可以使用:

border-radius: 0px 10px 0px 0px; 

是:

border-radius: [top-left],[top-right],[bottom-right],[bottom-left]; 

这个工具对于CSS3非常好:css3generator.com

6

尝试

.css({'border-top-right-radius': 10}) 
0

可能更有帮助使用jQuery corner plugin,因为它也将占据边框半径定义浏览器的差异尝试。

0

这应该工作

css({BorderTopRightRadius: '10px', BorderBottomRightRadius: '10px'})