Html
    Css
    Js

    
                        
#pic {
    width: 410px;
    height: 200px;
    margin: 0 auto;
}
  
#pic #po {
    width: 500px;
    overflow: hidden;
    height: 305px;
    left: 20px; 
    position: relative;
}
 
#pic #pol {
    width: 3000px;
    height: 300px;
    position: absolute;
}
 
#pic #num {
    width: 120px;
    height: 25px;
    position: absolute;
    z-index: 2;
    left: 377px;
    top: 280px;
} 
 
#pic #num span {
    width: 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 12px;
    height: 15px;
    float: left;
    color: #000000;
    text-align: center;
}
 
#pic #num span.cut {
    background: #000000;
    color: #FFFFFF;
}
 
img {
    width: 500px;
    height: 300px;
    float: left;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:2.1.4
 立即下载

简单的jQuery轮播图

要注意图片与盛放图片的容器的大小相匹配

0