forked from SevdaErkan/Carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slider change without requesting for image
- Loading branch information
1 parent
48bf587
commit f25c6c8
Showing
4 changed files
with
94 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
{ | ||
"name": "carousel2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"keywords": [], | ||
"main": "src/index.js", | ||
"dependencies": { | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-icons": "4.2.0", | ||
"react-scripts": "4.0.0", | ||
"sass": "1.34.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/runtime": "7.13.8", | ||
"typescript": "4.1.3" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test --env=jsdom", | ||
"eject": "react-scripts eject" | ||
}, | ||
"browserslist": [ | ||
">0.2%", | ||
"not dead", | ||
"not ie <= 11", | ||
"not op_mini all" | ||
] | ||
} | ||
"name": "carousel2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"keywords": [], | ||
"main": "src/index.js", | ||
"dependencies": { | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-icons": "4.2.0", | ||
"react-scripts": "4.0.0", | ||
"sass": "1.34.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/runtime": "7.13.8", | ||
"typescript": "4.1.3" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test --env=jsdom", | ||
"eject": "react-scripts eject" | ||
}, | ||
"browserslist": [ | ||
">0.2%", | ||
"not dead", | ||
"not ie <= 11", | ||
"not op_mini all" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,51 @@ | ||
.App { | ||
font-family: sans-serif; | ||
text-align: center; | ||
font-family: sans-serif; | ||
text-align: center; | ||
} | ||
.slider { | ||
position: relative; | ||
height: 100vh; | ||
width: 100%; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin:0; | ||
padding: 0; | ||
|
||
position: relative; | ||
height: 60vh; | ||
width: 100%; | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.slide { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
min-width: 50%; | ||
font-size: 50px; | ||
opacity: 0; | ||
pointer-events: none; | ||
transform: scale(0.8); | ||
transition: 0.5s ease-in-out; | ||
} | ||
|
||
.slide__active { | ||
opacity: 1; | ||
transform: scale(1); | ||
pointer-events: visible; | ||
} | ||
.slide{ | ||
min-width: 50%; | ||
height: 60vh;; | ||
font-size: 50px; | ||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
img{ | ||
width: 100%; | ||
height: 100%; | ||
object-fit: contain; | ||
.left-arrow, | ||
.right-arrow { | ||
position: absolute; | ||
z-index: 1; | ||
font-size: 30px; | ||
top: 50%; | ||
color: yellowgreen; | ||
} | ||
.left-arrow,.right-arrow{ | ||
position: absolute; | ||
z-index: 1; | ||
font-size: 30px; | ||
top: 50%; | ||
.left-arrow { | ||
left: 5%; | ||
} | ||
.left-arrow{ | ||
left:5%; | ||
.right-arrow { | ||
right: 5%; | ||
} | ||
.right-arrow{ | ||
right:5% | ||
} |