single-page-desing-portfolio with scss
Design comparison
Solution retrospective
how to make a slide?
-
frame > container (flex row) > several images
-
give the frame and images certain but responsive width and height, for example, 60vw.
-
queryselect the frame and all pictures as an array of nodes.
-
get the frame's width in the js file.
-
modify the container's margin-left based on the index of the nodes array and frame's width.
Community feedback
- @AudreyLovelacePosted almost 2 years ago
notes for touchscreen
1.add {passive: true} for event listener as the 3rd parameter to prevent default scrolling.
2.event.preventdefault() also works but it's much more expensive so passive: true is preferable.
notes for element.style
1.element.style="something" will be erased when you declare element.style="another thing" else where.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord