$frame.sly({ horizontal: 1, itemNav: "basic", dragContent: 1, startAt: 3, scrollBy: 1 });
$frame.sly({ horizontal: 1, itemNav: "smart", dragContent: 1, startAt: 3, scrollBy: 1 });
$frame.sly({ horizontal: 1, itemNav: "centered", dragContent: 1, scrollBy: 1 });
$frame.sly({ horizontal: 1, itemNav: "forceCentered", dragContent: 1, scrollBy: 1, easing: "easeOutBack" // with jQuery easing v1.3 });
$frame.sly({ horizontal: 1, itemNav: "basic", dragContent: 1, scrollBy: 1, cycleBy: 'pages', cycleInterval: 1000, startPaused: 1 });
-
js图片滚动
js图片切换特效制作js焦点图slider上下滚动切换带序列按钮控制图片滚动。内含js代码下载。
-
js lazyload延迟加载
js图片特效随着浏览器滚动条滚动网页图片延迟加载,可控制页面某一位置图片是否开始加载。js代码。
-
js文字特效
js文字特效制作js文字切换效果让焦点文字带滤镜效果切换滚动,内含js代码下载。
-
js文字滚动
js文字滚动插件制作一个js文字滚动效果,两排双行关联向上文字间隙滚动,支持多组文字滚动列表。内含js代码下载。
-
js表单验证
js特效制作js checkbox复选框全选 反选 取消全部等设置多个表单里面的checkbox复选框勾选特效。内含js代码下载。
-
js表格
js表格特效制作一个js表格排序筛选,点击表格标题,子内容按大小、字母先后顺序排列。内含js代码下载。
-
js文字闪烁
js文字特效制作一个js文字闪烁效果,文字间隙颜色变化红、黄、蓝闪烁过程。内含js代码下载
$frame.sly({ horizontal: 1, itemNav: 'forceCentered', cycleBy: 'items', cycleInterval: 2000 });
$frame.sly({ itemNav: "smart", dragContent: 1, startAt: 10, scrollBy: 1, elasticBounds: 1 });
Lorem ipsum dolor
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper.Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.Vestibulum erat wisi, condimentum sed, commodo vitae
, ornare sit amet, wisi. Aenean fermentum, elit eget tinciduntcondimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis.
Header Level 2
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna. Cras in mi at felis aliquet congue.Ut a est eget ligula molestie gravida. Curabitur massa. Donec eleifend, libero at sagittis mollis, tellus est malesuada tellus,at luctus turpis elit sit amet quam. Vivamus pretium ornare est.
Header Level 3
- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
- Aliquam tincidunt mauris eu risus.
#header h1 a { display: block; width: 300px; height: 80px; }
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Header Level 4
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
$frame.sly({ scrollBy: 100, startAt: 100 });
共用的css样式
.slyWrap .controls{margin:20px 0 ;} .controls{text-align:center;} .sly{overflow:hidden;} .sly > ul{list-style:none;margin:0;padding:0;} .sly > ul li{position:relative;margin:0;padding:0;background:#4DBCE9;color:#fff;text-align:center;cursor:pointer;} .sly > ul li.active{background:#fff;color:#4DBCE9; -webkit-box-shadow:inset 0 0 0 1px #4DBCE9, inset 0 0 40px 20px #97e6f7; -moz-box-shadow:inset 0 0 0 1px #4DBCE9, inset 0 0 40px 20px #97e6f7; -o-box-shadow:inset 0 0 0 1px #4DBCE9, inset 0 0 40px 20px #97e6f7; box-shadow:inset 0 0 0 1px #4DBCE9, inset 0 0 40px 20px #97e6f7; } .pages{list-style:none;margin:20px 0;padding:0;text-align:center;} .pages li{display:inline-block;width:11px;height:11px;margin:0 2px;text-indent:-999px;background:#fff;border-radius:10px;cursor:pointer; overflow:hidden;border:1px solid #aaa; } .pages li:hover{background:#eee;} .pages li.active{background:#999;border-color:#888;box-shadow:inset 0 0 0 2px #eee;} .scrollbar{background:#808080;border-radius:4px;border:2px solid #808080;border-top-color:#666;line-height:0;} .scrollbar .handle{border-radius:4px;background:#fff;cursor:pointer;line-height:0; -webkit-box-shadow:0 1px 0 #555; -moz-box-shadow:0 1px 0 #555; -o-box-shadow:0 1px 0 #555; box-shadow:0 1px 0 #555; }
水平的css样式
/* */ #horizontal .slyWrap{margin:3em 0;} #horizontal .scrollbar{margin:1em 0;height:5px;} #horizontal .scrollbar .handle{width:100px;height:100%;} #horizontal .example1 .sly{height:170px;} #horizontal .example1 .sly ul{height:100%;} #horizontal .example1 .sly ul li{float:left;width:187px;height:100%;margin:0 1px 0 0;} #horizontal .example1 .sly ul li img{width:185px;height:168px;border:solid 1px #ddd;} #horizontal .example1 .sly ul li.active img{border:solid 1px #3366cc;} #horizontal .example2 .sly{height:200px;} #horizontal .example2 .sly ul{height:100%;} #horizontal .example2 .sly ul li{float:left;width:266px;height:100%;margin:0 1px 0 0; } #horizontal .example2 .sly ul li img{width:264px;height:198px;border:solid 1px #ddd;} #horizontal .example2 .sly ul li.active img{border:solid 1px #3366cc;} #horizontal .example3 .sly{height:200px;} #horizontal .example3 .sly ul{height:100%;} #horizontal .example3 .sly ul li{float:left;width:465px;height:100%;margin:0 10px 0 0;cursor:default;} #horizontal .example3 .sly ul li.active{background:#4DBCE9;color:#fff;-webkit-box-shadow:none;-moz-box-shadow:none;-o-box-shadow:none;box-shadow:none;} #horizontal .example4 .sly{height:160px;} #horizontal .example4 .sly ul{height:100%;} #horizontal .example4 .sly ul li{float:left;padding:0 20px;width:360px;height:100%;font-size:50px;opacity:0.2;cursor:default; overflow:hidden;background:none;box-shadow:none;font-size:14px;text-align:justify;color:#444; -webkit-transition:opacity 0.3s linear;-moz-transition:opacity 0.3s linear;-o-transition:opacity 0.3s linear;transition:opacity 0.3s linear; } #horizontal .example4 .sly ul li.active{opacity:1;}
垂直的css样式
#vertical .slyWrap{margin:1em 0;width:450px;float:left;} #vertical .scrollbar{width:5px;} #vertical .scrollbar .handle{height:100px;width:100%;} #vertical .example1{position:relative;} #vertical .example1 .sly{width:425px;height:500px;border:1px solid #aaa;} #vertical .example1 .sly ul{width:100%;height:100%;overflow:hidden;} #vertical .example1 .sly ul li{height:80px;margin:0 0 1px 0;font-size:40px;line-height:80px;} #vertical .example1 .scrollbar{position:absolute;top:0;right:10px;height:500px;} #vertical .example2{position:relative;} #vertical .example2 .sly{width:445px;margin-left:25px;height:500px;border:1px solid #aaa;background:#fff;} #vertical .example2 .sly > div{padding:1em 1.5em;} #vertical .example2 .scrollbar{position:absolute;top:0;left:10px;height:500px;}
按钮的css样式
/* Buttons */ .btn{display:inline-block;padding:5px 10px 5px;margin-bottom:0;font-size:13px;line-height:18px;color:#333333;text-align:center;text-decoration:none; vertical-align:middle;background-color:#f5f5f5;text-shadow:-1px -1px 0 rgba(255, 255, 255, 0.75); background-image:-moz-linear-gradient(top, #fff, #e6e6e6); background-image:-ms-linear-gradient(top, #fff, #e6e6e6); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6)); background-image:-webkit-linear-gradient(top, #fff, #e6e6e6); background-image:-o-linear-gradient(top, #fff, #e6e6e6); background-image:linear-gradient(top, #fff, #e6e6e6); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#444', endColorstr='#333', GradientType=0); border:1px solid; border-color:#333 #333 #bfbfbf; border-color:rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.3); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); -webkit-border-radius:2px; -moz-border-radius:2px; border-radius:2px; -webkit-box-shadow:inset 0 1px 0 #fff, 0 1px 1px rgba(0, 0, 0, 0.15); -moz-box-shadow:inset 0 1px 0 #fff, 0 1px 1px rgba(0, 0, 0, 0.15); box-shadow:inset 0 1px 0 #fff, 0 1px 1px rgba(0, 0, 0, 0.15); cursor:pointer; filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); *margin-left:.3em; } .btn:hover, .btn:active, .btn.active, .btn.disabled, .btn[disabled]{background-color:#e6e6e6;} .btn:active, .btn.active{background-color:#cccccc \9;} .btn:first-child{*margin-left:0;} .btn:hover{ color:#333333; text-decoration:none; background-color:#e6e6e6; background-position:0 -15px; -webkit-transition:background-position 0.1s linear; -moz-transition:background-position 0.1s linear; -ms-transition:background-position 0.1s linear; -o-transition:background-position 0.1s linear; transition:background-position 0.1s linear; } .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} .btn.active, .btn:active{ background-image:none; -webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); -moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); background-color:#e6e6e6; background-color:#d9d9d9 \9; outline:0; } .btn.disabled, .btn[disabled]{cursor:default;background-image:none;background-color:#e6e6e6;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none; -moz-box-shadow:none;box-shadow:none; } .btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} .btn-large [class^="icon-"]{margin-top:1px;} .btn-small{padding:5px 9px;font-size:11px;line-height:16px;} .btn-small [class^="icon-"]{margin-top:-1px;} .btn-mini{padding:2px 6px;font-size:11px;line-height:14px;} .btn-blue, .btn-blue:hover, .btn-orange, .btn-orange:hover, .btn-red, .btn-red:hover, .btn-green, .btn-green:hover, .btn-black, .btn-black:hover{text-shadow:0 -1px 0 rgba(0, 0, 0, 0.3);color:#ffffff;} .btn-blue, .btn-orange, .btn-red, .btn-green, .btn-black{ -webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.3); -moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.3); box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 1px rgba(0, 0, 0, 0.3); } .btn-blue.active, .btn-orange.active, .btn-red.active, .btn-green.active{color:rgba(255, 255, 255, 0.75);} .btn-blue{ background-color:#006dcc; background-image:-moz-linear-gradient(top, #0088cc, #0044cc); background-image:-ms-linear-gradient(top, #0088cc, #0044cc); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image:-webkit-linear-gradient(top, #0088cc, #0044cc); background-image:-o-linear-gradient(top, #0088cc, #0044cc); background-image:linear-gradient(top, #0088cc, #0044cc); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color:#0044cc #0044cc #002a80; border-color:rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.5); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-blue:hover, .btn-blue:active, .btn-blue.active, .btn-blue.disabled, .btn-blue[disabled]{background-color:#0044cc;} .btn-blue:active, .btn-blue.active{background-color:#003399 \9;} .btn-orange{ background-color:#faa732; background-image:-moz-linear-gradient(top, #fbb450, #f89406); background-image:-ms-linear-gradient(top, #fbb450, #f89406); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); background-image:-webkit-linear-gradient(top, #fbb450, #f89406); background-image:-o-linear-gradient(top, #fbb450, #f89406); background-image:linear-gradient(top, #fbb450, #f89406); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); border-color:#f89406 #f89406 #ad6704; border-color:rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-orange:hover, .btn-orange:active, .btn-orange.active, .btn-orange.disabled, .btn-orange[disabled]{background-color:#f89406;} .btn-orange:active, .btn-orange.active{background-color:#c67605 \9;} .btn-red{ background-color:#da4f49; background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f); background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f); background-image:-o-linear-gradient(top, #ee5f5b, #bd362f); background-image:linear-gradient(top, #ee5f5b, #bd362f); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); border-color:#bd362f #bd362f #802420; border-color:rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.4); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-red:hover, .btn-red:active, .btn-red.active, .btn-red.disabled, .btn-red[disabled]{background-color:#bd362f;} .btn-red:active, .btn-red.active{background-color:#942a25 \9;} .btn-green{ background-color:#5bb75b; background-image:-moz-linear-gradient(top, #62c462, #51a351); background-image:-ms-linear-gradient(top, #62c462, #51a351); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); background-image:-webkit-linear-gradient(top, #62c462, #51a351); background-image:-o-linear-gradient(top, #62c462, #51a351); background-image:linear-gradient(top, #62c462, #51a351); background-repeat:repeat-x; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); border-color:#51a351 #51a351 #387038; border-color:rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.3); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-green:hover, .btn-green:active, .btn-green.active, .btn-green.disabled, .btn-green[disabled]{background-color:#51a351;} .btn-green:active, .btn-green.active{background-color:#408140 \9;} .btn-black{ background-color:#393939; background-image:-moz-linear-gradient(top, #454545, #262626); background-image:-ms-linear-gradient(top, #454545, #262626); background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#454545), to(#262626)); background-image:-webkit-linear-gradient(top, #454545, #262626); background-image:-o-linear-gradient(top, #454545, #262626); background-image:linear-gradient(top, #454545, #262626); background-repeat:repeat-x; -webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 1px rgba(0, 0, 0, 0.3); -moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 1px rgba(0, 0, 0, 0.3); box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 1px rgba(0, 0, 0, 0.3); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545', endColorstr='#262626', GradientType=0); border-color:#222 #222 #000; border-color:rgba(0, 0, 0, 0.5) rgba(0, 0, 0, 0.3) rgba(0, 0, 0, 0.7); filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); } .btn-black:hover, .btn-black:active, .btn-black.active, .btn-black.disabled, .btn-black[disabled]{background-color:#222;} .btn-black:active, .btn-black.active{background-color:#0c0c0c \9;} button.btn, input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;} button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} button.btn.large, input[type="submit"].btn.large{*padding-top:7px;*padding-bottom:7px;} button.btn.small, input[type="submit"].btn.small{*padding-top:3px;*padding-bottom:3px;} .btn-group{position:relative;*zoom:1;*margin-left:.3em;} .btn-group:before, .btn-group:after{display:table;content:"";} .btn-group:after{clear:both;} .btn-group:first-child{*margin-left:0;} .btn-group + .btn-group{margin-left:5px;} .btn-toolbar{ } .btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;} .btn-group .btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .btn-group .btn:first-child{ margin-left:0; -webkit-border-top-left-radius:2px; -moz-border-radius-topleft:2px; border-top-left-radius:2px; -webkit-border-bottom-left-radius:2px; -moz-border-radius-bottomleft:2px; border-bottom-left-radius:2px; } .btn-group .btn:last-child, .btn-group .dropdown-toggle{ -webkit-border-top-right-radius:2px; -moz-border-radius-topright:2px; border-top-right-radius:2px; -webkit-border-bottom-right-radius:2px; -moz-border-radius-bottomright:2px; border-bottom-right-radius:2px; } .btn-group .btn.large:first-child{ margin-left:0; -webkit-border-top-left-radius:2px; -moz-border-radius-topleft:2px; border-top-left-radius:2px; -webkit-border-bottom-left-radius:2px; -moz-border-radius-bottomleft:2px; border-bottom-left-radius:2px; } .btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle{ -webkit-border-top-right-radius:2px; -moz-border-radius-topright:2px; border-top-right-radius:2px; -webkit-border-bottom-right-radius:2px; -moz-border-radius-bottomright:2px; border-bottom-right-radius:2px; }