CSS for sliding operations

Source: Internet
Author: User

The principle of CSS sliding operation is similar to that of a carousel diagram:

If the box width or height exceeds the width or height of the parent box, the slider can be hidden by hiding the scroll bar:

  • The HTML structure is as follows:

    <Divclass= "box">        <ul>            <Li></Li>            <Li></Li>            <Li></Li>            <Li></Li>            <Li></Li>            <Li></Li>        </ul>    </Div>

    The CSS code is as follows:

    * {padding:0;margin:0; }. Box{width:500px;Border:1px solid Black;Height:100px;Overflow:Scroll;? }. Box::-webkit-scrollbar{Display:None; }ul{List-style:None;width:800px; }Li{width:100px;Height:100px;Background-color:Red;Border:1px solid Black;float: Left; }

CSS for sliding operations

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.