I'm working on a school project that requires me to use only html, css, and javascript for creating a website. Currently, I'm designing a landing page with a button that will navigate the user to another page. My goal is to have the background image zoom in when the button is clicked before redirecting the user. Here is my code snippet:
CSS followed by HTML
* {
margin: 0;
padding: 0;
}
body {
margin: 0;
font-family: Brush Script MT;
font-size: 17px;
color: #926239;
line-height: 1.6;
}
#showcase {
background-image: url('https://image.freepik.com/free-vector/cartoon-cave-with-stalactites_29190-1074.jpg');
background-size: cover;
background-position: center;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 0 20px;
}
#showcase h1 {
font-size: 10px;
line-height: 1.2;
}
#showcase p {
font-size: 20px;
}
#showcase .button {
font-size: 25px;
text-decoration: none;
color: #10B589;
border: #10B589 1px solid;
padding: 10px 20px;
border-radius: 10px;
margin-top: 20px;
}
#showcase .button:hover {
background: #10B589;
color: #fff;
animation: wiggle 1s;
box-sizing: border-box;
}
#section-a {
padding: 20px;
background: #10B589;
color: #fff;
text-align: center;
}
#section-b {
padding: 20px;
background: #10B589;
text-align: center;
}
#section-c {
display: flex;
}
#section-c div {
padding: 20px;
}
#section-c .box-1,
#section-c .box-3 {
background: #10B589;
color: #fff;
}
#section-c .box-2 {
background: #f9f9f9;
}
@keyframes wiggle {
12% { transform: scale(0.4, 0.65); }
13% { transform: scale(0.43, 0.67); }
14% { transform: scale(0.5, 0.76); }
25% { transform: scale(0.8, 1.3); }
37% { transform: scale(0.9, 0.95); }
50% { transform: scale(1.1, 0.8); }
62% { transform: scale(0.9, 1); }
75% { transform: scale(0.7, 1.2); }
87% { transform: scale(0.8, 1.1); }
}
<html>
<head>
<header id="showcase">
<a href="insertname.html" class="button">Enter The Cave</a>
</header>
<body>
</body>
</head>
<link href="ISTwebsite.css" rel="stylesheet" type="text/css">
</html>
I've searched through several resources online but haven't found a solution yet. Can someone please assist me?