jquery Click the left and right scroll slider to implement the picture scrolling plugin

Source: Internet
Author: User
Tags domain registration vps server

Simple, click Left and right scrolling jquery slider Plugin

Load CSS

The code is as follows Copy Code

* Reset Styles
***********************/
HTML, body, Div, span, applets, object, IFRAME,H1, H2, H3, H4, H5, H6, p, blockquote, PRE,A, ABBR, acronym, address, Big, C Ite, Code,del, DFN, EM, img, INS, KBD, Q, S, Samp,small, Strike, strong, sub, SUP, TT, VAR,B, u, I, CENTER,DL, DT, DD, OL, UL, Li,fieldset, form, label, Legend,table, Caption, Tbody, TFOOT, THEAD, tr, TH, td,article, aside, canvas, details, EMB Ed,figure, figcaption, footer, header, Hgroup,menu, nav, output, Ruby, section, Summary,time, mark, audio, video {
margin:0;
padding:0;
border:0;
font-size:100%;
Font:inherit;
Vertical-align:baseline;
}
/* HTML5 Display-role reset for older browsers * *
Article, aside, details, figcaption, Figure,footer, Header, Hgroup, menu, nav, section {display:block;}
body {line-height:1;}
OL, ul {list-style:none;}
BLOCKQUOTE, q {quotes:none;}
Blockquote:before, Blockquote:after,q:before, q:after {content: '; content:none;}
Table {border-collapse:collapse; border-spacing:0;}
strong {font-weight:bold;}
em {font-style:italic;}

Body {Background:url (.. /images/body.png) repeat left top; font-family: ' Georgia ', ' Arial ', Sans-serif}
#container {width:80%; max-width:800px; margin:0 Auto;}

H2 {padding:20px 0 30px; font-size:18px; line-height:22px; font-style:italic;}
H2 a {text-decoration:none; color: #427f9e;}
H2 a:hover {border-bottom:1px dotted #427f9e;}



/* Browser Resets * *
. Flex-container A:active,
. flexslider a:active {outline:none;}
. Slides,
. Flex-control-nav,
. flex-direction-nav {margin:0; padding:0; list-style:none;}

/* Flexslider Necessary Styles
*********************************/
. flexslider {width:100%; margin:0; padding:0;}
. flexslider. Slides > Li {display:none}/* Hide the slides before the JS is loaded. Avoids image jumping * *
. Flexslider. slides img {max-width:100%; display:block;}
. flex-pauseplay span {text-transform:capitalize}

/* Clearfix for the. Slides element */
. slides:after {content: "."; display:block; clear:both; visibility:hidden ; line-height:0; height:0;}
Html[xmlns]. Slides {Display:block}
* html. Slides {height:1%}
A{outline:none;blr:expression (This.onfocus=this.blur ());}
/No JavaScript fallback */
/* If You are the not using another script, such as Modernizr, make sure you
 * Include JS that eliminates this class on page load */
. No-js. Slides > Li:first-child {display:block;


/* flexslider Default Theme
*********************************/
. Flexslider {background: #fff; border: 4PX solid #fff; position:relative; -webkit-border-radius:5px; -moz-border-radius:5px; -o-border-radius:5px; border-radius:5px; Zoom:1;}
. Flexslider. Slides {zoom:1;}
. Flexslider. Slides > li {position:relative;}
/* Suggested container for "Slide" animation setups. Can Replace this and your own, if you wish */
. flex-container {zoom:1; position:relative;

/* Caption style */
/* IE rgba () hack */
. flex-caption {background:none;-ms-filter:progid:dximagetransform.mi Crosoft.gradient (startcolorstr= #4C000000, endcolorstr= #4C000000);
Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= #4C000000, endcolorstr= #4C000000); zoom:1;}
. flex-caption {width:96%; padding:2%; position:absolute; left:0; bottom:0; Background:rgba (0,0,0,.3); color: #f ff text-shadow:0 -1px 0 Rgba (0,0,0,.3); font-size:14px; line-height:18px.}

/* Direction Nav */
. Flex-direction-nav li a {width:52px; height:52px; margin: -13px 0 0; display:block; backgro Und:url (.. /images/bg_direction_nav.png) no-repeat 0 0; Position:absolute; top:50%; Cursor:pointer; Text-indent: -9999px;}
. Flex-direction-nav Li A.next {background-position: -52px 0; Right: -21px;}
. Flex-direction-nav Li A.prev {background-position:0 0; Left: -20px;}
. Flex-direction-nav Li a.disabled {opacity:. 3; Filter:alpha (opacity=30); cursor:default;

/* Control NAV */
. flex-control-nav {width:100%; position:absolute; bottom: -30px; text-align:center;}
. Flex-control-nav Li {margin:0 0 0 5px; display:inline-block; zoom:1; *display:inline;}
. flex-control-nav li:first-child {margin:0;}
. Flex-control-nav Li a {width:13px; height:13px; display:block; Background:url (.) /images/bg_control_nav.png) no-repeat 0 0; Cursor:pointer; Text-indent: -9999px;}
. Flex-control-nav li a:hover {background-position:0 -13px;}
. Flex-control-nav Li a.active {background-position:0 -26px; cursor:default;}

HTML structure

The code is as follows Copy Code

<div id= "Container" >
<div class= "Flexslider" >
<ul class= "Slides" >
<li>

<p class= "flex-caption" >vps server </p>
</li>
<li>
<a href= "" target= "_blank" ></a>
<p class= "Flex-caption" > Pride of Use Aliyun </p>
</li>
<li>
<a href= "" target= "_blank" ></a>
<p class= "Flex-caption" > Universal domain Registration </p>
</li>
<li>
<a href= "" target= "_blank" ></a>
<p class= "Flex-caption" > Western Digital Server </p>
</li>
</ul>
</div>
</div>

Introducing jquery libraries and jquery Plug-ins

  code is as follows copy code

<script Src= "Http://libs.baidu.com/jquery/1.9.1/jquery.min.js" ></SCRIPT>
<script src= "js/ Jquery.flexslider-min.js "></script>
<script type=" Text/javascript "
$ (window). Load ( function () {
 $ ('. Flexslider '). Flexslider ();
});
</script>

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.