Meta Description" name="description" />
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="ad.size" content="width=300,height=250">
<title>HTML5 Banner Ad</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
overflow: hidden;
}
#banner {
width: 300px;
height: 250px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
position: relative;
overflow: hidden;
cursor: pointer;
}
.content {
position: relative;
z-index: 2;
padding: 20px;
color: white;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.logo {
font-size: 24px;
font-weight: bold;
opacity: 0;
animation: fadeInDown 0.8s ease forwards;
}
.headline {
font-size: 26px;
font-weight: bold;
line-height: 1.2;
margin-bottom: 10px;
opacity: 0;
animation: fadeInLeft 0.8s ease 0.3s forwards;
}
.subtext {
font-size: 14px;
margin-bottom: 15px;
opacity: 0;
animation: fadeInLeft 0.8s ease 0.6s forwards;
}
.cta-button {
background: white;
color: #667eea;
padding: 12px 24px;
border: none;
border-radius: 25px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
align-self: flex-start;
opacity: 0;
animation: fadeInUp 0.8s ease 0.9s forwards;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
transform: scale(1.05);
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.circle {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
}
.circle1 {
width: 150px;
height: 150px;
top: -50px;
right: -50px;
animation: float 6s ease-in-out infinite;
}
.circle2 {
width: 100px;
height: 100px;
bottom: -30px;
left: -30px;
animation: float 8s ease-in-out infinite reverse;
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes float {
0%, 100% {
transform: translateY(0) translateX(0);
}
50% {
transform: translateY(-20px) translateX(10px);
}
}
</style>
</head>
<body>
<div id="banner">
<div class="circle circle1"></div>
<div class="circle circle2"></div>
<div class="content">
<div>
<div class="logo">BRAND</div>
</div>
<div>
<div class="headline">Summer Sale 50% Off</div>
<div class="subtext">Limited time offer on all products</div>
<button class="cta-button" onclick="handleClick()">Shop Now</button>
</div>
</div>
</div>
<script>
function handleClick() {
// Track click event
console.log('Banner clicked');
// Replace with your actual click-through URL
var clickTag = 'https://www.example.com';
window.open(clickTag, '_blank');
}
// Animation replay on hover (optional)
var banner = document.getElementById('banner');
banner.addEventListener('mouseenter', function() {
this.style.transform = 'scale(1.02)';
this.style.transition = 'transform 0.3s ease';
});
banner.addEventListener('mouseleave', function() {
this.style.transform = 'scale(1)';
});
</script>
</body>
</html>1
1
5KB
5KB
286.0ms
312.0ms
286.0ms