Notify: Pure CSS notification bar
so the basic idea is to create a decent looking lightweight pure css top notification bar. No images, no javascript… that means no extra http requests. You will get a fast loading, less bandwidth burning, fully customizable simple menu
by michalmarketingmakers
March 21, 2020
HTML
<script src="http://deepubalan.com/blog/wp-content/uploads/2012/02/db-bg.png"></script>
<div class="topBar" id="notify">Welcome! Please like my facebook page here:
<a href="http://www.facebook.com/deepu6alan" class="link">Facebook</a>
<div class="btnClose"><a href="#notify">X</a></div>
<div class="btnOpen"><a href="#">notify</a></div>
</div>
<div class="demoPage" style="demoPage"></div>
CSS
.topBar {
width: 100%;
height: 23px;
position: relative;
top: 0;
text-align: center;
border-bottom: 1px solid #fff;
box-shadow: 0 2px 5px #ccc;
padding-top: 7px;
color: #fff;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
.topBar .link {
padding: 2px 8px;
background-color: #831e1a;
color: #fff;
border-radius: 2px;
font-size: 12px;
font-weight: bold;
}
.topBar .link:hover {
background-color: #e62601;
}
.btnClose,
.btnOpen {
position: absolute;
right: 30px;
font-weight: bold;
width: 50px;
}
.btnClose {
font-size: 12px;
line-height: 44px;
height: 25px;
margin-top: -30px;
}
.btnOpen {
font-size: 0;
border: 1px solid #fff;
box-shadow: 0 2px 5px #ccc;
border-top: none;
border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
-webkit-border-radius: 0 0 4px 4px;
top: -30px;
opacity: .8;
}
.btnOpen:hover {
opacity: 1;
}
.btnOpen a {
display: block;
}
.topBar a {
text-decoration: none;
color: #fff;
}
.topBar:target {
top: -36px;
position: absolute;
-webkit-transition: top 0.4s ease-in;
-moz-transition: top 0.4s ease-in;
}
.topBar:target .btnOpen {
top: 31px;
height: 30px;
font-size: 12px;
line-height: 34px;
-webkit-transition-property: top;
-webkit-transition-duration: .4s;
-moz-transition-property: top;
-moz-transition-duration: .4s;
}
.topBar:target .btnClose {
display: none;
}
.topBar:target .btnOpen,
.topBar {
background: rgb(226, 87, 81);
background: -moz-linear-gradient(top, rgba(226, 87, 81, 1) 0%, rgba(228, 93, 86, 1) 49%, rgba(213, 82, 76, 1) 50%, rgba(226, 87, 81, 1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(226, 87, 81, 1)), color-stop(49%, rgba(228, 93, 86, 1)), color-stop(50%, rgba(213, 82, 76, 1)), color-stop(100%, rgba(226, 87, 81, 1)));
background: -webkit-linear-gradient(top, rgba(226, 87, 81, 1) 0%, rgba(228, 93, 86, 1) 49%, rgba(213, 82, 76, 1) 50%, rgba(226, 87, 81, 1)...