update css next prev button
This commit is contained in:
parent
676b8aa711
commit
282024ad7e
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -5,7 +5,7 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
/.pnp
|
/.pnp
|
||||||
.pnp.js
|
.pnp.js
|
||||||
/JsonData
|
../src/JsonData
|
||||||
# testing
|
# testing
|
||||||
/coverage
|
/coverage
|
||||||
|
|
||||||
|
|
|
@ -23,10 +23,11 @@ const Slider = () => {
|
||||||
},[]);
|
},[]);
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
|
||||||
<div className="left-btn">
|
<div className="left-btn">
|
||||||
<button onClick={handlePre}>{"<"}</button>
|
<button onClick={handlePre}>{"<"}</button>
|
||||||
</div>
|
</div>
|
||||||
<img src={data[next]?.download_url} alt="img1"></img>
|
<img src={data[next]?.download_url} alt="image-not-found"></img>
|
||||||
<div className="right-btn">
|
<div className="right-btn">
|
||||||
<button onClick={handleNext}>{">"}</button>
|
<button onClick={handleNext}>{">"}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,16 +13,32 @@ code {
|
||||||
}
|
}
|
||||||
img{
|
img{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-btn, .right-btn{
|
.left-btn, .right-btn{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
transform: translateY(300%);
|
||||||
}
|
}
|
||||||
.left-btn{
|
.left-btn{
|
||||||
left: 20px;
|
left: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.right-btn{
|
.right-btn{
|
||||||
right: 20px;
|
right: 20px;
|
||||||
}
|
}
|
||||||
|
button{
|
||||||
|
height: 20px;
|
||||||
|
width: 30px;
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
color: black;
|
||||||
|
border: none;
|
||||||
|
font-size: 125%;
|
||||||
|
}
|
||||||
|
button:hover{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.left-btn, .right-btn { top: 40%; }
|
||||||
|
}
|
Loading…
Reference in a new issue