{"id":2368,"date":"2015-02-07T08:20:44","date_gmt":"2015-02-07T08:20:44","guid":{"rendered":"http:\/\/www.vishmax.com\/en\/?p=2368"},"modified":"2015-05-10T07:15:03","modified_gmt":"2015-05-10T07:15:03","slug":"create-hide-show-notification-bar-with-css3-tutorial-and-demo","status":"publish","type":"post","link":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/","title":{"rendered":"Create hide \/ show notification bar with css3 tutorial and demo"},"content":{"rendered":"<p>Here is a good tutorial and demo on creating a notification bar using only CSS3. This example didn&#8217;t use a single line of JavaScript, so its is fully user and browser friendly approach.<\/p>\n<h2>CSS<\/h2>\n<pre lang=\"css\">\r\n\r\n\t\t:root .max-notificationbar,\r\n\t\t.max-notificationbar label,\r\n\t\t.max-notificationbar label span{\r\n\t\t\tdisplay: block;\r\n\t\t}\r\n\t\t.max-notificationbar,\r\n\t\t.max-notificationbar *{\r\n\t\t\tmargin: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t\t.max-notificationbar > div,\r\n\t\t.max-notificationbar label span{\r\n\t\t\tline-height: 30px;\r\n\t\t\ttext-align: center;\r\n\t\t\tcolor: #fff;\r\n\t\t\ttransition: margin 300ms ease-in-out;\r\n\t\t\tbox-shadow: 0 0 2px 2px rgba(58, 58, 58, .50);\r\n\t\t}\r\n\t\t.max-notificationbar,\r\n\t\t.max-notificationbar input{\r\n\t\t\tdisplay: none;\r\n\t\t}\r\n\t\t.max-notificationbar{\r\n\t\t\tposition: fixed;\r\n\t\t\tz-index: 250;\r\n\t\t\ttop: 0;\r\n\t\t\tleft: 0;\r\n\t\t\twidth: 100%;\r\n\t\t\tcolor: #000;\r\n\t\t\tcursor: default;\r\n\t\t}\r\n\t\t.max-notificationbar > div{\r\n\t\t\tmargin-top: -67px;\r\n\t\t\tpadding: 18px 64px;\r\n\t\t\tfont-size: 16px;\r\n\t\t}\r\n\t\t.max-notificationbar > div > div{\r\n\t\t\twhite-space: nowrap;\r\n\t\t\ttext-overflow: ellipsis;\r\n\t\t\toverflow: hidden;\r\n\t\t}\r\n\t\t.max-notificationbar label{\r\n\t\t\tfloat: right;\r\n\t\t\tmargin: 0 16px 0 0;\r\n\t\t}\r\n\t\t.max-notificationbar label span{\r\n\t\t\twidth: 30px;\r\n\t\t\theight: 30px;\r\n\t\t\tfont-size: 27px;\r\n\t\t\tborder-top: 0;\r\n\t\t\tborder-radius: 0 0 4px 4px;\r\n\t\t\tcursor: pointer;\r\n\t\t}\r\n\t\t.max-notificationbar input ~ label span:first-child{\r\n\t\t\tborder-color: transparent;\r\n\t\t\tbox-shadow: none;\r\n\t\t\tbackground: none;\r\n\t\t}\r\n\t\t.max-notificationbar input:not(:checked) ~ label span:first-child{\r\n\t\t\topacity: 0;\r\n\t\t}\r\n\t\t.max-notificationbar input:checked ~ label span:first-child{\r\n\t\t\topacity: 1;\r\n\t\t\ttransition: opacity 300ms 300ms ease-in-out;\r\n\t\t}\r\n\t\t.max-notificationbar input:not(:checked) ~ label span:last-child{\r\n\t\t\tmargin-top: -33px;\r\n\t\t}\r\n\t\t.max-notificationbar input:checked ~ label span:last-child{\r\n\t\t\tmargin-top: -70px;\r\n\t\t}\r\n\t\t.max-notificationbar input:checked ~  div{\r\n\t\t\tmargin-top: 0;\r\n\t\t}\r\n\t\t.max-notificationbar.max-notificationbar-e34c26 > div,\r\n\t\t.max-notificationbar.max-notificationbar-e34c26 label span{\r\n\t\t\tbackground: #1b58b8;\r\n\t\t}\r\n\r\n<\/pre>\n<h2>HTML<\/h2>\n<pre lang=\"html\">\r\n\r\n        <!-- CSS3 Notification bar -->\r\n        <div class=\"max-notificationbar max-notificationbar-e34c26\">\r\n            <input type=\"checkbox\" id=\"max-notificationbar-switcher\" checked=\"checked\" \/>\r\n            <label for=\"max-notificationbar-switcher\">\r\n                <span>&#8679;<\/span>\r\n                <span>&#8681;<\/span>\r\n            <\/label>\r\n            <div>\r\n                <div>Pure CSS3 notification bar without jQuery. Click the arrow on the right to expand\/collapse.<\/div>\r\n            <\/div>\r\n        <\/div>\r\n        <\/div>\r\n         <!-- \/CSS3 Notification bar -->\r\n\r\n<\/pre>\n<p><a class=\"external-download\" href=\"http:\/\/vishmax.com\/demos\/css3-notification-bar.html\" target=\"_blank\">Live Demo<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a good tutorial and demo on creating a notification bar using only CSS3. This example didn&#8217;t use a single line of JavaScript, so its is fully user and browser friendly approach. CSS :root .max-notificationbar, .max-notificationbar label, .max-notificationbar label span{ display: block; } .max-notificationbar, .max-notificationbar *{ margin: 0; padding: 0; } .max-notificationbar > div, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2589,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[44],"tags":[72,101,94],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com\" \/>\n<meta property=\"og:description\" content=\"Here is a good tutorial and demo on creating a notification bar using only CSS3. This example didn&#8217;t use a single line of JavaScript, so its is fully user and browser friendly approach. CSS :root .max-notificationbar, .max-notificationbar label, .max-notificationbar label span{ display: block; } .max-notificationbar, .max-notificationbar *{ margin: 0; padding: 0; } .max-notificationbar &gt; div, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\" \/>\n<meta property=\"og:site_name\" content=\"Vishmax.com\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-07T08:20:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-10T07:15:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2015\/02\/notificatio-bar-400x230.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"400\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\"},\"headline\":\"Create hide \/ show notification bar with css3 tutorial and demo\",\"datePublished\":\"2015-02-07T08:20:44+00:00\",\"dateModified\":\"2015-05-10T07:15:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\"},\"wordCount\":48,\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"keywords\":[\"Code Library\",\"Examples\",\"Web Design Tips\"],\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\",\"url\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\",\"name\":\"Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com\",\"isPartOf\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\"},\"datePublished\":\"2015-02-07T08:20:44+00:00\",\"dateModified\":\"2015-05-10T07:15:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.vishmax.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create hide \/ show notification bar with css3 tutorial and demo\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#website\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"name\":\"Vishmax.com\",\"description\":\"Software Company in Calicut for Web Design and eCommerce\",\"publisher\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.vishmax.com\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#organization\",\"name\":\"Vishmax.com\",\"url\":\"http:\/\/www.vishmax.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"contentUrl\":\"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png\",\"width\":150,\"height\":50,\"caption\":\"Vishmax.com\"},\"image\":{\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/www.vishmax.com\/en\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/","og_locale":"en_US","og_type":"article","og_title":"Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com","og_description":"Here is a good tutorial and demo on creating a notification bar using only CSS3. This example didn&#8217;t use a single line of JavaScript, so its is fully user and browser friendly approach. CSS :root .max-notificationbar, .max-notificationbar label, .max-notificationbar label span{ display: block; } .max-notificationbar, .max-notificationbar *{ margin: 0; padding: 0; } .max-notificationbar > div, [&hellip;]","og_url":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/","og_site_name":"Vishmax.com","article_published_time":"2015-02-07T08:20:44+00:00","article_modified_time":"2015-05-10T07:15:03+00:00","og_image":[{"width":400,"height":230,"url":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2015\/02\/notificatio-bar-400x230.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#article","isPartOf":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/"},"author":{"name":"admin","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93"},"headline":"Create hide \/ show notification bar with css3 tutorial and demo","datePublished":"2015-02-07T08:20:44+00:00","dateModified":"2015-05-10T07:15:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/"},"wordCount":48,"publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"keywords":["Code Library","Examples","Web Design Tips"],"articleSection":["Labs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/","url":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/","name":"Create hide \/ show notification bar with css3 tutorial and demo - Vishmax.com","isPartOf":{"@id":"http:\/\/www.vishmax.com\/en\/#website"},"datePublished":"2015-02-07T08:20:44+00:00","dateModified":"2015-05-10T07:15:03+00:00","breadcrumb":{"@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vishmax.com\/en\/labs\/create-hide-show-notification-bar-with-css3-tutorial-and-demo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.vishmax.com\/en\/"},{"@type":"ListItem","position":2,"name":"Create hide \/ show notification bar with css3 tutorial and demo"}]},{"@type":"WebSite","@id":"http:\/\/www.vishmax.com\/en\/#website","url":"http:\/\/www.vishmax.com\/en\/","name":"Vishmax.com","description":"Software Company in Calicut for Web Design and eCommerce","publisher":{"@id":"http:\/\/www.vishmax.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.vishmax.com\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.vishmax.com\/en\/#organization","name":"Vishmax.com","url":"http:\/\/www.vishmax.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","contentUrl":"https:\/\/www.vishmax.com\/en\/wp-content\/uploads\/2023\/03\/logo-vishmax.png","width":150,"height":50,"caption":"Vishmax.com"},"image":{"@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/785fa94b56eb17ae7706d30777d6ab93","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.vishmax.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e218268870406c917d20b442936d9e68?s=96&d=monsterid&r=g","caption":"admin"},"url":"https:\/\/www.vishmax.com\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/2368"}],"collection":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/comments?post=2368"}],"version-history":[{"count":0,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/posts\/2368\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/media\/2589"}],"wp:attachment":[{"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/media?parent=2368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/categories?post=2368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vishmax.com\/en\/wp-json\/wp\/v2\/tags?post=2368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}