<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Apple Music Billboard Ad</title>
<style>
body {
margin: 0;
padding: 0;
background: #111;
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.billboard-ad {
width: 970px;
height: 250px;
background: linear-gradient(to right, #000000, #1c1c1e);
color: #fff;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
display: flex;
overflow: hidden;
opacity: 0; /* Will animate in with GSAP */
}
.billboard-text {
flex: 1;
padding: 30px;
}
.billboard-text h1 {
font-size: 28px;
margin: 0 0 10px;
}
.billboard-text p {
font-size: 16px;
line-height: 1.5;
margin-bottom: 20px;
}
.cta-button {
display: inline-block;
padding: 10px 20px;
background: #fa233b;
color: #fff;
text-decoration: none;
border-radius: 8px;
font-weight: bold;
transition: background 0.3s ease;
}
.cta-button:hover {
background: #ff3b4f;
}
.playlist-container {
flex: 1;
overflow: hidden;
padding: 10px;
position: relative;
}
.playlist-scroll {
position: absolute;
width: 100%;
}
iframe {
width: 100%;
height: 220px;
border-radius: 10px;
border: none;
}
</style>
</head>
<body>
<div class="billboard-ad" id="ad">
<div class="billboard-text">
<h1>Feel the Sound of Summer</h1>
<p>Stream exclusive playlists, new releases, and your favorite artists—all ad-free on Apple Music.</p>
<a class="cta-button" href="https://music.apple.com/" target="_blank">Try Apple Music Free</a>
</div>
<div class="playlist-container">
<div class="playlist-scroll" id="scrollTrack">
<iframe allow="autoplay *; encrypted-media *;" sandbox="allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation-by-user-activation"
src="https://embed.music.apple.com/us/playlist/summer-vibes/pl.1c2b46b2e3cb4f3d9d726e8038b7480e">
</iframe>
</div>
</div>
</div>
<!-- GSAP CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script>
// Slide in the entire ad
gsap.to("#ad", {
duration: 1.2,
y: 0,
opacity: 1,
ease: "power3.out",
from: { y: 30 }
});
// Scroll the playlist container (infinite loop)
gsap.to("#scrollTrack", {
y: -25,
duration: 6,
ease: "linear",
repeat: -1,
yoyo: true
});
</script>
</body>
</html>
15
5
362KB
1489KB
293.0ms
484.0ms
779.0ms