$("#TipsWin").css("left",(($(document).width())/2-(parseInt(div宽度)/2))+"px"); 转载于:https://www.cnblogs.com/starweb/archive/2008/09/19/1293990.html