forked from anuragverma108/SwapReads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cookies.html
31 lines (27 loc) · 1.66 KB
/
cookies.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cookie Consent Box</title>
</head>
<body style="font-family: Arial, sans-serif;">
<!-- Cookie Consent Box -->
<div id="cookie-box" style="position: fixed; bottom: 20px; right: 20px; background-color: #fff; border-radius: 10px; box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); padding: 20px; max-width: 300px; z-index: 1000; text-align: center;">
<button id="close-btn" style="position: absolute; top: 10px; right: 10px; background-color: #d3004a; color: white; border: none; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; font-weight: bold;">×</button>
<p style="font-size: 14px; color: #333; line-height: 1.5;">We use cookies to enhance your browsing experience, serve personalized ads or content, and analyze our traffic. By clicking "Accept", you consent to our use of cookies.</p>
<button id="accept-btn" style="background-color: #d3004a; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer;">Accept</button>
</div>
<!-- JavaScript to Hide Box on Click -->
<script>
// Close button click event listener
document.getElementById('close-btn').addEventListener('click', function() {
document.getElementById('cookie-box').style.display = 'none';
});
// Accept button click event listener
document.getElementById('accept-btn').addEventListener('click', function() {
document.getElementById('cookie-box').style.display = 'none';
});
</script>
</body>
</html>