|
|
(未显示同一用户的41个中间版本) |
第1行: |
第1行: |
− | {{#widget:style|style= | + | <includeonly><includeonly>{{#Widget:Slick/style}}<div class="main-carousel" >{{#if:{{{轮播图片1|}}}|<div>{{#if:{{{轮播说明1|}}}|<span class="blackout">{{{轮播说明1|}}}</span>|}}[[文件:{{{轮播图片1|}}}|link={{{轮播链接1|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片2|}}}|<div>{{#if:{{{轮播说明2|}}}|<span class="blackout">{{{轮播说明2|}}}</span>|}}[[文件:{{{轮播图片2|}}}|link={{{轮播链接2|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片3|}}}|<div>{{#if:{{{轮播说明3|}}}|<span class="blackout">{{{轮播说明3|}}}</span>|}}[[文件:{{{轮播图片3|}}}|link={{{轮播链接3|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片4|}}}|<div>{{#if:{{{轮播说明4|}}}|<span class="blackout">{{{轮播说明4|}}}</span>|}}[[文件:{{{轮播图片4|}}}|link={{{轮播链接4|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片5|}}}|<div>{{#if:{{{轮播说明5|}}}|<span class="blackout">{{{轮播说明5|}}}</span>|}}[[文件:{{{轮播图片5|}}}|link={{{轮播链接5|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片6|}}}|<div>{{#if:{{{轮播说明6|}}}|<span class="blackout">{{{轮播说明6|}}}</span>|}}[[文件:{{{轮播图片6|}}}|link={{{轮播链接6|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片7|}}}|<div>{{#if:{{{轮播说明7|}}}|<span class="blackout">{{{轮播说明7|}}}</span>|}}[[文件:{{{轮播图片7|}}}|link={{{轮播链接7|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片8|}}}|<div>{{#if:{{{轮播说明8|}}}|<span class="blackout">{{{轮播说明8|}}}</span>|}}[[文件:{{{轮播图片8|}}}|link={{{轮播链接8|}}}|class=no-lazy]]</div>|}}{{#if:{{{轮播图片9|}}}|<div>{{#if:{{{轮播说明9|}}}|<span class="blackout">{{{轮播说明9|}}}</span>|}}[[文件:{{{轮播图片9|}}}|link={{{轮播链接9|}}}|class=no-lazy]]</div>|}}</div>{{#Widget:Slick}}</includeonly> |
− | .jcarousel-wrapper {
| |
− | position: relative;
| |
− | border: 5px solid #fff;
| |
− | -webkit-box-shadow: 0 0 2px #999;
| |
− | -moz-box-shadow: 0 0 2px #999;
| |
− | box-shadow: 0 0 2px #999;
| |
− | } | |
− | | |
− | /** Carousel **/ | |
− | | |
− | .jcarousel {
| |
− | position: relative;
| |
− | overflow: hidden;
| |
− | } | |
− | | |
− | .jcarousel ul {
| |
− | width: 20000em;
| |
− | position: relative;
| |
− | list-style: none;
| |
− | margin: 0;
| |
− | padding: 0;
| |
− | } | |
− | | |
− | .jcarousel li {
| |
− | float: left;
| |
− | position: relative;
| |
− | margin:0 !important;
| |
− | } | |
− | | |
− | .jcarousel img {
| |
− | display: block;
| |
− | max-width: 100%;
| |
− | height: auto !important;
| |
− | } | |
− | | |
− | /** Carousel Controls **/
| |
− | | |
− | .jcarousel-control-prev,
| |
− | .jcarousel-control-next {
| |
− | position: absolute;
| |
− | top: 50%;
| |
− | margin-top: -15px;
| |
− | width: 30px;
| |
− | height: 30px;
| |
− | text-align: center;
| |
− | background: #f4c430 !important;
| |
− | color: black !important;
| |
− | text-decoration: none !important;
| |
− | text-shadow: 0 0 1px #000;
| |
− | font: 24px/27px Arial, sans-serif;
| |
− | -webkit-border-radius: 30px;
| |
− | -moz-border-radius: 30px;
| |
− | border-radius: 30px;
| |
− | -webkit-box-shadow: 0 0 4px black;
| |
− | -moz-box-shadow: 0 0 4px black;
| |
− | box-shadow: 0 0 4px black;
| |
− | opacity: 0.7;
| |
− | transition: all 0.1s ease-in;
| |
− | } | |
− | | |
− | .jcarousel-control-prev:hover,
| |
− | .jcarousel-control-next:hover {
| |
− | opacity: 0.1;
| |
− | } | |
− | | |
− | .jcarousel-control-prev {
| |
− | left: 15px;
| |
− | } | |
− | | |
− | .jcarousel-control-next {
| |
− | right: 15px;
| |
− | } | |
− | | |
− | .jcarousel-control-prev:hover span,
| |
− | .jcarousel-control-next:hover span {
| |
− | display: block;
| |
− | } | |
− | | |
− | .jcarousel-control-prev.inactive,
| |
− | .jcarousel-control-next.inactive {
| |
− | opacity: .25;
| |
− | cursor: default;
| |
− | } | |
− | | |
− | /** Carousel Pagination **/ | |
− | | |
− | .jcarousel-pagination {
| |
− | position: absolute;
| |
− | bottom: 10px;
| |
− | left: 50%;
| |
− | | |
− | margin: 0;
| |
− | margin-left: -22px;
| |
− | } | |
− | | |
− | @media (max-width: 620px) {
| |
− | .jcarousel-pagination {
| |
− | bottom: -35px;
| |
− | }
| |
− | } | |
− | | |
− | .jcarousel-pagination a {
| |
− | text-decoration: none;
| |
− | display: inline-block;
| |
− | | |
− | font-size: 11px;
| |
− | height: 10px;
| |
− | width: 10px;
| |
− | line-height: 10px;
| |
− | | |
− | background: #fff;
| |
− | color: #4E443C;
| |
− | border-radius: 10px;
| |
− | text-indent: -9999px;
| |
− | | |
− | margin-right: 7px;
| |
− | | |
− | -webkit-box-shadow: 0 0 2px #4E443C;
| |
− | -moz-box-shadow: 0 0 2px #4E443C;
| |
− | box-shadow: 0 0 2px #4E443C;
| |
− | } | |
− | | |
− | .jcarousel-pagination a.active {
| |
− | background: #4E443C;
| |
− | color: #fff;
| |
− | opacity: 1;
| |
− | | |
− | -webkit-box-shadow: 0 0 2px #F0EFE7;
| |
− | -moz-box-shadow: 0 0 2px #F0EFE7;
| |
− | box-shadow: 0 0 2px #F0EFE7;
| |
− | } | |
− | | |
− | .jcarousel .blackout{
| |
− | height:auto;
| |
− | width:100%;
| |
− | position:absolute;
| |
− | display:block;
| |
− | background:grey;
| |
− | } | |
− | }} | |
− | <div class="jcarousel-wrapper">
| |
− | <div class="jcarousel"> | |
− | *<span class="blackout">test</span>[[文件:No.134.jpg|width=100%|height=100%]]
| |
− | *<span class="blackout">test</span>[[文件:Icon_No.135.png|width=100%|height=100%]]
| |
− | *<span class="blackout">test</span>[[文件:No.136.jpg|width=100%|height=100%]]
| |
− | </div> | |
− | <span href="#" class="jcarousel-control-prev">‹</span> | |
− | <span href="#" class="jcarousel-control-next">›</span>
| |
− | <p class="jcarousel-pagination"></p> | |
− | </div> | |
− | | |
− | | |
− | <script> | |
− | mw.loader.load('/images/jslib/jquery.jcarousel-packed.js','text/javascript')
| |
− | $('.jcarousel')
| |
− | .on('jcarousel:create jcarousel:reload', function() {
| |
− | var element = $(this);
| |
− | element.find('.jcarousel ul').css('width', '20000em');
| |
− | width = element.innerWidth();
| |
− | // This shows 1 item at a time.
| |
− | // Divide `width` to the number of items you want to display,
| |
− | // eg. `width = width / 3` to display 3 items at a time.
| |
− | element.jcarousel('items').css('width', width + 'px');
| |
− | })
| |
− | $('.jcarousel').jcarouselAutoscroll({
| |
− | interval: 4000
| |
− | }); | |
− | $('.jcarousel').jcarousel({
| |
− | wrap:'circular'
| |
− | }) | |
− | </script> | |