JQuery笔记(五) 圆角表格的效果

把四个角的图片截下来,用css定位到四个角上,表格的底色设置为一样的即可。

 

$("#tbl").css({"border-collapse":"collapse",width:"800px",position:"absolute",top:"60px",left:"120px",width:"800px",height:"20px"});
$("#tbl td").css({"font-size":"14px","line-height":"36px",background:"#CCE1FE",margin:"0",border:"2px solid white"});
$("#tbl tr:first td:first").css({background:"#CCE1FE url(jqui/tblcorner1.jpg) no-repeat left top"});
$("#tbl tr:first td:last").css({background:"#CCE1FE url(jqui/tblcorner2.jpg) no-repeat right top"});
$("#tbl tr:last td:first").css({background:"#CCE1FE url(jqui/tblcorner3.jpg) no-repeat left bottom"});
$("#tbl tr:last td:last").css({background:"#CCE1FE url(jqui/tblcorner4.jpg) no-repeat right bottom"});

 

tblcorner1 tblcorner2 tblcorner3 tblcorner4

posted @ 2010-04-05 10:55  jetz  阅读(435)  评论(0编辑  收藏  举报