<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Full Width Bottom-Up In-App Message Modal with Custom Font</title>
<style>
@font-face {
font-family: 'Pretendard-Regular';
src: url('<https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff>') format('woff');
font-weight: 400;
font-style: normal;
}
body, h1, p, button {
margin: 0;
padding: 0;
font-family: 'Pretendard-Regular', Arial, sans-serif; /* Update font-family here */
}
.overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.4);
display: flex;
align-items: flex-end;
justify-content: center;
visibility: hidden;
opacity: 0;
transition: visibility 0s, opacity 0.5s;
}
.overlay.active {
visibility: visible;
opacity: 1;
}
.modal {
background: white;
border-radius: 20px 20px 0 0;
width: 100%;
transform: translateY(100%);
transition: transform 0.5s;
overflow: hidden;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}
.overlay.active .modal {
transform: translateY(0);
}
.modal-body {
position: relative;
padding: 20px;
padding-bottom: 50%;
text-align: center;
}
.modal-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: -1;
}
.modal-footer {
padding: 10px 20px;
display: flex;
justify-content: space-between;
background-color: #FFFFFF;
position: relative;
}
button {
border: none;
padding: 10px 20px;
font-size: 14px;
border-radius: 5px;
cursor: pointer;
background-color: #FFFFFF;
color: black; /* Adjusted text color for visibility */
}
.close-button {
background-color: #FFFFFF;
color: #C3C3C3
}
.shop-button {
background-color: #FFFFFF;
color: black;
}
</style>
</head>
<body>
<div class="overlay" id="overlay">
<div class="modal">
<div class="modal-body">
<img src="<https://i.ibb.co/xsb8GPp/DALL-E-2024-04-28-10-56-39-Illustrate-a-modern-digital-marketer-surrounded-by-computer-screens-deepl.webp>" alt="Modern Digital Marketer" class="modal-image">
</div>
<div class="modal-footer">
<button class="close-button" onclick="toggleModal()">닫기</button>
<button class="shop-button" onclick="toggleModal()">확인하기</button>
</div>
</div>
</div>
<script>
function toggleModal() {
const overlay = document.getElementById('overlay');
overlay.classList.toggle('active');
}
// Automatically open the modal for demonstration
window.onload = function() {
toggleModal();
};
</script>
</body>
</html>