Answer the question
In order to leave comments, you need to log in
Implement adaptability in self-written image slider?
There is a small self-written JQuery slider with two twists:
<div class="slider">
<div>
<img src="1.jpg">
<img src="2.jpg">
<img src="3.jpg">
</div>
<a class="prev"></a>
<a class="next"></a>
</div>
.slider {
float: right;
max-width: 712px;
max-height: 423px;
overflow: hidden;
position: relative;
}
.slider div {
position:relative;
width: 10000px;
height: 424px;
}
.slider div img {
float: left;
display: block;
width: 100%;
max-width: 712px;
}
Answer the question
In order to leave comments, you need to log in
The simplest example, it seems to me, is through a pseudo-class.
Set an event to resize the window. Then take the width of the screen and change it for the pictures.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question