Manual switch between js image carousel and js image switchover
ScrollPicLeft. js is used to switch between the front and back of images. It is suitable for displaying certificates and recommended items on webpages. Unlike the traditional marquee rolling method, it can manually click the arrow before and after switching to flip the image, so as to achieve the effect of browsing the previous one and the next one.
No need to call jquery. Initialization is simple and easy to use.
Instance effect:
Js Code:
<Script type = "text/javascript"> var scrollPhoto = new ScrollPicleft (); scrollPhoto. scrollContId = "ISL_Photo"; // content container ID "" scrollPhoto. arrLeftId = "Left_Photo"; // The left arrow ID scrollPhoto. arrRightId = "Right_Photo"; // The right arrow ID scrollPhoto. frameWidth = 450; // The width of the display box is scrollPhoto. pageWidth = 150; // page flip width scrollPhoto. speed = 10; // The moving speed (in milliseconds, the smaller the speed) scrollPhoto. space = 10; // move the pixel each time (unit: px, the larger the image is) scrollPhoto. autoPlay = false; // automatically play scrollPhoto. autoPlayTime = 3; // The automatic playback interval (seconds) scrollPhoto. initialize (); // initialization </script>
This article describes how to manually switch js image carousel. Share it with you for your reference. The details are as follows:
This is a code for manually switching results based on js image carousel. The implementation process is very simple.
The code for manually switching js image carousel for everyone is as follows:
<Head> <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "/> <title> manual switchover of js image carousel </title> <script type =" text/javascript "src =" js/ScrollPicLeft. js "> </script> <style> html, body, ul, li {margin: 0; padding: 0;} ul, li {list-style: none ;}. dd_main {width: 520px ;}. zl_left {width: 35px; float: left; text-align: left; padding-top: 60px }. zl_right {width: 35px; float: right; text-align: right; padding-top: 60px }. zl_content {width: pixel PX; height: 153px; float: left; overflow: hidden ;}. zl_content ul li {width: 130px; padding: 0 10px; text-align: center; float: left ;}. welcome {position: fixed; width: 100%; text-align: center; bottom: 30px ;}. welcome a {color: #0350B8 ;} </style>
Source code download: manual switching of js image carousel
The above is the js image carousel manual switch effect code shared for everyone. I hope you will like it and apply it to practice.