Create a fun app that displays random photos from a collection each time you click a button.
- Click a button to show a new random photo
- Loads images dynamically from a predefined list
- Smooth image transition effects
- Responsive layout for all devices
- Arrays and random selection
- DOM manipulation
- Event handling
- CSS transitions and animations
Fetch random photos from an external API like Unsplash.
<iframe src="https://codesandbox.io/embed/lpg2t5?view=preview&module=%2Fapp.js"
style="width:100%; height: 500px; border:0; border-radius: 4px; overflow:hidden;"
title="random-photo-viewer"
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking"
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
></iframe>