gpt4 book ai didi

javascript - Cycle2 寻呼机不显示

转载 作者:行者123 更新时间:2023-11-28 05:01:35 25 4
gpt4 key购买 nike

我正在使用 jquery cycle2 slider ,但我的 jquery cycle2 slider 寻呼机没有显示在 slider 图像上,即使我在那里尝试了演示代码我想在 slider 底部显示寻呼机但它没有对齐请检查我的代码并帮助我。

*{
margin: 0;
padding: 0;
}

header{
position: fixed;
z-index: 777;
}

/* Top Menu Start Here */

.top_nav{
height: 90px;
width: 100%;
background: rgba(0,0,0,.5);
position: fixed;
z-index: 1;
transition:all 0.7s ease;
-webkit-transition:all 0.7s ease;
-moz-transition:all 0.7s ease;
-o-transition:all 0.7s ease;
-ms-transition:all 0.7s ease;
}

.container{
height: 100vh;
width: 100%;
max-width: 100%;
background-image: url("https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQ24kd_2tEzjbb_GdPnMQKog7lMCxtYmmy7dxjjpDr6d2ZseK-Dig");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
top: 0;
}

.site-dt{
background-color: #fff;
height: 573px;
width: 100%;
}


#slider-main{
height: 578px;
width: 100%;
overflow: hidden;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

#slider-main #slider img{
height: 100%;
width: 100%;
}

.section_about{
height: 573px;
width: 100%;
background-color: #de5670;
overflow: hidden;
position: absolute;
}

<html>
<head>
<link rel="stylesheet" type="text/css" href="main.css">
<Script type ="text/javascript" src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="http://malsup.github.io/min/jquery.cycle2.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
</head>
<header>
<div class="top_nav">
</div>
</header>
<div class="container">
</div>
<div id="slider-main">
<div id="slider" class="cycle-slideshow"
data-cycle-fx=scrollHorz
data-cycle-timeout=2000
>
<div class="cycle-pager">

</div>
<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>
</div>
<div class="section_about">

</div>
</html>

最佳答案

我在 fiddle 中稍微调整了一下。 html 有点困惑,我认为您可能添加了太多重叠的 css。希望这会让您朝着正确的方向前进。

此外,您还加载了两次 Jquery,但无济于事:)

*{
margin: 0;
padding: 0;
}

header{
position: fixed;
z-index: 777;
}

/* Top Menu Start Here */

.top_nav{
height: 90px;
width: 100%;
background: rgba(0,0,0,.5);
position: fixed;
z-index: 1;
transition:all 0.7s ease;
-webkit-transition:all 0.7s ease;
-moz-transition:all 0.7s ease;
-o-transition:all 0.7s ease;
-ms-transition:all 0.7s ease;
}

.container{
/*height: 100vh;
width: 100%;
max-width: 100%;*/
background-image: url("https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQ24kd_2tEzjbb_GdPnMQKog7lMCxtYmmy7dxjjpDr6d2ZseK-Dig");
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
top: 0;
}
/*
.site-dt{
background-color: #fff;
height: 573px;
width: 100%;
}


#slider-main{
height: 578px;
width: 100%;
overflow: hidden;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

#slider-main #slider img{
height: 100%;
width: 100%;
}
*/
.section_about{
height: 573px;
/*width: 100%;*/
background-color: #de5670;
/*overflow: hidden;
position: absolute;*/
}

.cycle-pager {
background: white;
}
.cycle-pager span {
padding: 10px;
cursor: pointer;
}
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="https://malsup.github.io/min/jquery.cycle2.min.js"></script>
<header>
<div class="top_nav">
</div>
</header>
<div class="container">

<div id="slider-main">
<div id="slider" class="cycle-slideshow"
data-cycle-fx=scrollHorz
data-cycle-timeout=2000
>
<div class="cycle-pager">

</div>
<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>
</div>


<div class="section_about">

</div>

</div>

关于javascript - Cycle2 寻呼机不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40072269/

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