This article mainly introduces the example code of a rolling effect to the right of a js image. If you need it, refer to the example below.
Style
The Code is as follows:
# P_left {float: left; width: 60px; height: 86px ;}
# StarScroll {width: 843px; height: 188px; margin-left: 15px; margin-right: 15px; padding-top: 9px; overflow: hidden; border: 1px solid red; float: left ;}
# StarScroll # contentScroll {width: 500%}
# StarScroll # scrolone {float: left ;}
# StarScroll # scroalone a {float: left; width: 204px; height: 188px; margin-right: 9px; float: left; display: inline ;}
# StarScroll # scrolone img {width: 204px; height: 188px; border: 0px ;}
# StarScroll # ScrollTwo {float: left ;}
# StarScroll # ScrollTwo a {float: left; width: 204px; height: 188px; margin-right: 9px; float: left; display: inline ;}
# StarScroll # ScrollTwo img {width: 204px; height: 188px; border: 0px ;}
# P_right {float: left; width: 60px; height: 86px ;}
. Arrow {background: url (images/arrow.png) no-repeat; cursor: pointer; height: 86px; width: 60px; cursor: pointer; display: block; margin-top: 50px ;}
. Prev {background-position: left top ;}
. Prev: hover {background-position: left bottom ;}
. Next {background-position: right top ;}
. Next: hover {background-position: right bottom ;}
Html code
The Code is as follows:
JS Code
The Code is as follows: