A fun and interactive DOM-based project that randomly displays IPL teams, their captains, origins, and number of IPL titles — with dynamic backgrounds and intro video overlay.
- 🎥 Auto-play intro video
- 🖼️ Dynamic background images
- 🔀 Random IPL team generator
- 📊 Shows wins, captain & origin
- ✨ Clean glass-effect UI
- 🧊 Fully DOM-based logic
| Technology | Used For |
|---|---|
| HTML5 | Structure |
| CSS3 | Styling & effects |
| JavaScript (DOM) | Logic |
| GitHub Pages | Hosting |
📦 DOM-Project-1
┣ index.html
┣ style.css
┣ script.js
┣ images/
┃ ┣ CSK.png
┃ ┣ MI.jpg
┃ ┣ RCB.png
┃ ┣ KKR.jpg
┃ ┣ SRH.jpg
┃ ┣ PBKS.png
┃ ┗ DC.jpg
┗ videos/
┗ introo.mp4
git clone https://github.com/vikaskumar098/DOM-Project-1.gitOpen in VS Code → Run with Live Server
btn.addEventListener("click", function () {
let winner = arr[Math.floor(Math.random() * arr.length)];
h1.innerHTML = `${winner.team} has won ${winner.wins} times in IPL!
${winner.captain} is the captain from ${winner.origin}.`;
main.style.backgroundImage = `url(${winner.primary})`;
main.style.color = winner.secondry;
video.style.display = "none";
});🔗 LinkedIn: Vikas Kumar
If you like this project, consider giving it a ⭐ star on GitHub!