Manual switch between js image carousel and js image switchover

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.