◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“模板:首页轮播2”的版本间的差异
Mikumikuer(讨论 | 贡献) |
Mikumikuer(讨论 | 贡献) |
||
第1行: | 第1行: | ||
{{#widget:style|style= | {{#widget:style|style= | ||
− | + | .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 { | .jcarousel { | ||
position: relative; | position: relative; | ||
第11行: | 第15行: | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
.jcarousel ul { | .jcarousel ul { | ||
width: 20000em; | width: 20000em; | ||
position: relative; | position: relative; | ||
− | |||
− | |||
list-style: none; | list-style: none; | ||
margin: 0; | margin: 0; | ||
第26行: | 第23行: | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
.jcarousel li { | .jcarousel li { | ||
− | |||
float: left; | float: left; | ||
− | max-height: | + | 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 | + | |
− | + | .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{ | .jcarousel .blackout{ | ||
height:auto; | height:auto; | ||
第51行: | 第140行: | ||
} | } | ||
}} | }} | ||
− | <div | + | <div class="jcarousel-wrapper"> |
− | <div class="jcarousel | + | <div class="jcarousel"> |
*<span class="blackout">test</span>[[文件:No.134.jpg|width=100%|height=100%]] | *<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>[[文件:Icon_No.135.png|width=100%|height=100%]] | ||
*<span class="blackout">test</span>[[文件:No.136.jpg|width=100%|height=100%]] | *<span class="blackout">test</span>[[文件:No.136.jpg|width=100%|height=100%]] | ||
</div> | </div> | ||
+ | <span href="#" class="jcarousel-control-prev">‹</span> | ||
+ | <span href="#" class="jcarousel-control-next">›</span> | ||
+ | <p class="jcarousel-pagination"></p> | ||
</div> | </div> | ||
+ | |||
<script> | <script> |
2019年8月20日 (二) 22:30的版本
<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>