这是原来的CSS样式 .item{float:left;overflow:hidden;margin-left:8px;margin-top:10px;width: 320px; height: 250px;background-repeat: no-repeat; background-image:url(../images/bgred.jpg)} .curve{position:relative;width:320px; height:250px; z-index:1; left: 75px; top: -40px;} 动态创建DIV代码如下: for(j = 0;j*8 <str.