Demo website for Bootstrap Cookie Banner. If you don't see the cookie banner below, clear the localstorage.

Code
<!-- Cookie Banner -->
<div class="nk-cookie-banner alert alert-dark text-center mb-0" role="alert">
🍪 This website uses cookies to ensure you get the best experience on our website.
<a href="https://www.cookiesandyou.com/" target="blank">Learn more</a>
<button type="button" class="btn btn-primary btn-sm ms-3" onclick="window.nk_hideCookieAlert()">
I Got It
</button>
</div>
<!-- End of Cookie Banner -->
.nk-cookie-banner { position: fixed; bottom: 0px; left: 0px; width: 100%; z-index: 999; border-radius: 0px; display: none; }
/* Javascript to show and hide cookie banner using localstroage */
/* Shows the Cookie banner */
function showCookieBanner(){
let cookieBanner = document.getElementsByClassName("nk-cookie-banner")[0];
cookieBanner.style.display = "block";
}
/* Hides the Cookie banner and saves the value to localstorage */
function hideCookieBanner(){
localStorage.setItem("web_dev_isCookieAccepted", "yes");
let cookieBanner = document.getElementsByClassName("nk-cookie-banner")[0];
cookieBanner.style.display = "none";
}
/* Checks the localstorage and shows Cookie banner based on it. */
function initializeCookieBanner(){
let isCookieAccepted = localStorage.getItem("web_dev_isCookieAccepted");
if(isCookieAccepted === null)
{
localStorage.clear();
localStorage.setItem("web_dev_isCookieAccepted", "no");
showCookieBanner();
}
if(isCookieAccepted === "no"){
showCookieBanner();
}
}
// Assigning values to window object
window.onload = initializeCookieBanner();
window.nk_hideCookieBanner = hideCookieBanner;