开发者

Jquery css border radius specific corners radius?

开发者_JS百科

Hello I am trying to change the border-radius of specific corners of some uls with jquery sortable on the method sort.

Here is my code so far and it is not working, any ideas?

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


try

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


You could use:

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

which is:

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

This tool is very good for css3: css3generator.com


It may be more helpful to try using the jQuery corner plugin as it will also account for browser differences in border radius definitions.


this should work

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜