我正试图阻止滑块转到特定的幻灯片,但没有成功。 我有一个滑块从0-5滑动,我想做的是防止滑块滑到0。我不想删除滑块0只是为了防止滑块滑到它。 我尝试了2种不同的方法,但仍要转到幻灯片0
body {
background: #ccc;
}
.main {
font-family: Arial;
width: 500px;
display: block;
margin: 0 auto;
}
h3 {
background: #fff;
color: #3498db;
font-size: 36px;
line-height: 100px;
margin: 10px;
padding: 2%;
position: relative;
text-align: center;
}
.action {
display: block;
margin: 100px auto;
width: 100%;
text-align: center;
}
.action a {
display: inline-block;
padding: 5px 10px;
background: #f30;
color: #fff;
text-decoration: none;
}
.action a:hover {
background: #000;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/jquery.slick/1.3.15/slick.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<div class="main">
<div class="slider slider-for">
<div><h3>0</h3></div>
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
</div>
</div>
Function eom(ByVal input_date As Date) As Date
' take the first day of the month from the input date, add one month,
' then back up one day
eom = DateAdd("d", -1, DateAdd("m", 1, DateSerial(Year(input_date), Month(input_date), 1)))
End Function