gpt4 book ai didi

html - 周期 2 上一个和下一个

转载 作者:太空宇宙 更新时间:2023-11-04 09:33:37 35 4
gpt4 key购买 nike

晚上好,我将 cycle2 与 prev 和 next 函数一起使用,但我无法将 prev 和 next 函数置于图像下方的中心。我环顾四周,我知道这会很愚蠢,但我就是看不到它。非常令人沮丧。谢谢加里

<script src="../../respond.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://malsup.github.com/jquery.cycle2.js"></script>
<script src="http://malsup.github.io/jquery.cycle2.center.js"></script>
@charset "UTF-8";
/* Simple fluid media
Note: Fluid media requires that you remove the media's height and width attributes from the HTML
http://www.alistapart.com/articles/fluid-images/
*/
img, object, embed, video {
max-width: 100%;
}

/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}

/*
Dreamweaver Fluid Grid Properties
----------------------------------
dw-num-cols-mobile: 4;
dw-num-cols-tablet: 8;
dw-num-cols-desktop: 12;
dw-gutter-percentage: 25;

Inspiration from "Responsive Web Design" by Ethan Marcotte
http://www.alistapart.com/articles/responsive-web-design

and Golden Grid System by Joni Korpi
http://goldengridsystem.com/
*/

.fluid {
clear: both;
margin-left: 0;
width: 100%;
float: left;
display: block;
}

.fluidList {
list-style:none;
list-style-image:none;
margin:0;
padding:0;
}

/* Mobile Layout: 480px and below. */

.gridContainer {
margin-left: auto;
margin-right: auto;
width: 86.45%;
padding-left: 2.275%;
padding-right: 2.275%;
clear: none;
float: none;
}
#div1 {
}
.gallery {
}
.zeroMargin_mobile {
margin-left: 0;
}
.hide_mobile {
display: none;
}

/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */

@media only screen and (min-width: 481px) {

.gridContainer {
width: 90.675%;
padding-left: 1.1625%;
padding-right: 1.1625%;
clear: none;
float: none;
margin-left: auto;
}
#div1 {
}
.gallery {
}
.hide_tablet {
display: none;
}
.zeroMargin_tablet {
margin-left: 0;
}
}

/* Desktop Layout: 769px to a max of 1232px. Inherits styles from: Mobile Layout and Tablet Layout. */

@media only screen and (min-width: 769px) {

.gridContainer {
width: 88.5%;
max-width: 1232px;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
margin-left: auto;
}
#div1 {
}
.gallery {
}
.zeroMargin_desktop {
margin-left: 0;
}
.hide_desktop {
display: none;
}
<body>
<div class="gridContainer clearfix">
<div id="div1" class="fluid"></div>
<div class="fluid gallery">
<br />
<br />
<div class="cycle-slideshow"
data-cycle-fx="scrollHorz"
data-cycle-timeout="0"
data-cycle-prev="#prev"
data-cycle-next="#next"
data-cycle-center-horz=true
data-cycle-center-vert=true
>
<img src="http://malsup.github.io/images/p1.jpg">
<img src="http://malsup.github.io/images/p2.jpg">
<img src="http://malsup.github.io/images/p3.jpg">
<img src="http://malsup.github.io/images/p4.jpg">
</div>
<br />
<br />
<div class="center">
<span style="text-align: center; text-decoration: none; font:open-sans; font-size:12px; color:#000000;">
<a href=# id="prev">Prev</a>
<a href=# id="next">Next</a></span>
</div>
</div>
</div>
</body>

最佳答案

你需要给容器div添加text-align center:

div.center {text-align:center;}

https://jsfiddle.net/dw25LLzc/

关于html - 周期 2 上一个和下一个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40568594/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com