Menu Notification Badges Using HTML5 Data-Attributes
Today we're going to take Orman Clark's Menu Notification Badges design and build it using HTML and CSS. We'll look at a couple of ways to achieve the effect, including the use of HTML5 data attributes which you may be unfamiliar with. Let's dive in!
Step 1: HTML5 Base Markup
Let's start off by throwing in some basic markup. We'll be using the HTML5 doctype throughout the tutorial. We'll create the menu itself by first adding a main div followed by list items which will create each menu link. We've also included the HTML5 shiv (or shim) script in the head of our document. This is called into play with older versions of Internet Explorer, allowing them to recognize and style HTML5 elements.
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
<head>
|
4 |
|
5 |
<!--Meta tags-->
|
6 |
<meta charset="utf-8"> |
7 |
|
8 |
<!--Title-->
|
9 |
<title>Menu Notification Badges</title> |
10 |
|
11 |
<!--Stylesheets-->
|
12 |
<link rel="stylesheet" href="styles.css"> |
13 |
|
14 |
<!--HTML5 Shiv-->
|
15 |
<!--[if lt IE 9]>
|
16 |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
17 |
<![endif]-->
|
18 |
|
19 |
</head>
|
20 |
<body>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
</body>
|
29 |
</html>
|
Step 2: Menu Markup
To create the structure of our menu we'll use an un-ordered list with 4 list items and an anchor tag inside. You may also want to nest the list within a <nav>
tag for deployment.
For the sake of this demonstration, we'll create a div around the menu with a class of wrapper. This will just be used to move the menu to the middle of the page.
Your markup should look something like this;
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
<head>
|
4 |
|
5 |
<!--Meta tags-->
|
6 |
<meta charset="utf-8"> |
7 |
|
8 |
<!--Title-->
|
9 |
<title>Menu Notification Badges</title> |
10 |
|
11 |
<!--Stylesheets-->
|
12 |
<link rel="stylesheet" href="styles.css"> |
13 |
|
14 |
<!--HTML5 Shiv-->
|
15 |
<!--[if lt IE 9]>
|
16 |
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
17 |
<![endif]-->
|
18 |
|
19 |
</head>
|
20 |
<body>
|
21 |
|
22 |
|
23 |
|
24 |
<div class="wrapper"> |
25 |
<ul class="menu"> |
26 |
<li><a href="#">Profile</a></li> |
27 |
<li><a href="#">Setting</a></li> |
28 |
<li><a href="#">Notifications</a></li> |
29 |
<li><a href="#">Logout</a></li> |
30 |
</ul>
|
31 |
</div>
|
32 |
|
33 |
|
34 |
|
35 |
</body>
|
36 |
</html>
|
Step 3: Some Basic CSS
Before we start styling the menu, we'll add some resets and some page styling. We'll first throw in a reset to remove any margins, padding etc from browser default stylesheet. Next we'll apply a background color to the body and a font-size of 16px. This fixed font size ensures the base size for our demo, but you may prefer to set it to 100% thus allowing the user to define their browser font size. We'll apply a width of 70% to the wrapper and center it with a margin-top of 200px.
1 |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; backound: transparent; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } :focus { outline: 0; } ins { text-decoration: none; } del { text-decoration: line-through; } table { border-collapse: collapse; border-spacing: 0; } a { text-decoration: none; } |
2 |
|
3 |
body { background:#ededed; font-size:16px; } |
4 |
|
5 |
|
6 |
|
7 |
.wrapper { |
8 |
width: 70%; |
9 |
margin: 200px auto; |
10 |
}
|
Step 4: Menu Base Styles
To kick off styling the menu, we'll first focus on the base of it. Target the un-ordered list first, which was given a class of 'menu'. We'll give it a display of inline-block, allowing us to determine the width/height of it depending on its content like a block element.
Next we'll apply a gradient background with all the browser prefixes. Then add some border radius, but hey what are those ems?! We're using ems (instead of pixels) to size the border radius relative to the font size. Check out the demo; you'll see the radius grow proportionately along with the larger text.
To work out the size we need, we'll take 3 (our desired border radius size in px) and divide it by 16px (our body font size). So 3px/16px = 0.188 but we'll round that up to 0.2.
Next we'll apply a simple gray border, then a box shadow with a drop and inset shadow. Don't forget those browser prefixes too!
1 |
.menu { |
2 |
display: inline-block; |
3 |
|
4 |
background-image: -webkit-linear-gradient(top, rgb(249, 249, 249), rgb(240, 240, 240)); |
5 |
background-image: -moz-linear-gradient(top, rgb(249, 249, 249), rgb(240, 240, 240)); |
6 |
background-image: -o-linear-gradient(top, rgb(249, 249, 249), rgb(240, 240, 240)); |
7 |
background-image: -ms-linear-gradient(top, rgb(249, 249, 249), rgb(240, 240, 240)); |
8 |
background-image: linear-gradient(top, rgb(249, 249, 249), rgb(240, 240, 240)); |
9 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f9f9f9', EndColorStr='#f0f0f0'); |
10 |
|
11 |
-webkit-border-radius:0.2em; |
12 |
-moz-border-radius:0.2em; |
13 |
border-radius:0.2em; |
14 |
|
15 |
border:1px solid #cecece; |
16 |
|
17 |
-webkit-box-shadow: |
18 |
inset 0px 1px 0px #fff, |
19 |
0px 1px 2px rgba(0,0,0,.06); |
20 |
-moz-box-shadow: |
21 |
inset 0px 1px 0px #fff, |
22 |
0px 1px 2px rgba(0,0,0,.06); |
23 |
box-shadow: |
24 |
inset 0px 1px 0px #fff, |
25 |
0px 1px 2px rgba(0,0,0,.06); |
26 |
}
|
Step 5: List Items
Moving on, let's improve the menu by styling the list items. First we'll float the list items to the left so they're all on one line and not listed. We'll then position them relatively, this will be needed later on when we create the badges. Next we'll add a border on the left and a border on the right.
Now we'll need to target the first list item and the last list item, so we'll do this by using the pseudo selectors; :first-child
and :last-child
(bear browser support in mind when using these). For the first one we'll remove the border left and we'll remove the right border from the last list item.
1 |
.menu li { |
2 |
float:left; |
3 |
position:relative; |
4 |
|
5 |
border-right:1px solid #d8d8d8; |
6 |
border-left:1px solid #ffffff; |
7 |
}
|
8 |
.menu li:first-child { border-left:none; } |
9 |
.menu li:last-child { border-right:none;} |
Step 6: Anchor Tags
Next thing we'll need to do is style the anchor tags. First we'll give them a font-family of Helvetica Neue with some font-stack fall backs for people who don't have the Helvetica font. Next we'll give them a font size of 0.75em (13px/16px=0.75). Then we'll apply a font weight of bold, followed by a color of #666666 and apply a text shadow.
We'll now apply some padding to the left and right of 1em (13px/13px=1) and some line-height to center the text vertically. We've based the line-height on 30px, interpreted into ems.
1 |
.menu li a { |
2 |
font-family:'Helvetica Neue', Helvetica, sans-serif; |
3 |
font-size:0.75em; |
4 |
font-weight:bold; |
5 |
color:#666666; |
6 |
text-shadow:0px 1px 0px #ffffff; |
7 |
|
8 |
display: block; |
9 |
padding:0 1em; |
10 |
line-height:2.5em; |
11 |
}
|
Our menu is starting to look pretty good now!



Step 7: Notification Bubbles Markup
Time to add the cool little notification bubbles. First you'll need to replace your menu HTML markup with the following. We'll create the bubbles using span tags, then for each color we'll apply an appropriate class. I've added pink, yellow and blue.
1 |
<div class="wrapper"> |
2 |
<ul class="menu"> |
3 |
<li><a href="#">Profile<span class="pink">2</span></a></li> |
4 |
<li><a href="#">Setting<span class="yellow">3</span></a></li> |
5 |
<li><a href="#">Notifications<span class="blue">6</span></a></li> |
6 |
<li><a href="#">Logout</a></li> |
7 |
</ul>
|
8 |
</div>
|
Step 8: Styling the Notification Bubbles
To create the notification bubbles we'll first style the span tags with everything except for the color and border color. This way we can change the colors easily by simply changing class names.
First we'll create some widths and heights, take 18px/12px=1.5em. Then we'll need to position them absolutely (0.5em from the right and -2em from the top). Next, a line height will be applied to center the number vertically and text-align center is used to center horizontally.
A font-family will be applied with Helvetica Neue, again with fallbacks for users without Helvetica. We'll make it bold, apply a color of white and then add a text-shadow. Next we'll add some box-shadows (we'll add two; one drop shadow and one inset shadow). Remember to create these while using browser prefixes. Now we'll add a border-radius of 4em (roughly 50px).
For the next stage in the process, we'll take advantage of some CSS3 techniques and get the hover effect working. We'll first hide the bubble using an opacity of 0. Next, to create our cool little animations we'll use some transitions. We'll target the top and opacity and tell it to ease-in over a period of 0.3 seconds (3 milliseconds). These will need the browser prefixes applied including -o- and -ms-.
1 |
span { |
2 |
position:absolute; |
3 |
top:-2em; |
4 |
right: 0.5em; |
5 |
|
6 |
width: 1.5em; |
7 |
height: 1.5em; |
8 |
|
9 |
line-height:1.5em; |
10 |
text-align:center; |
11 |
|
12 |
ont-family:'Helvetica Neue', Helvetica, sans-serif; |
13 |
font-weight:bold; |
14 |
color:#fff; |
15 |
text-shadow:0px 1px 0px rgba(0,0,0,.15); |
16 |
|
17 |
-webkit-box-shadow: |
18 |
inset 0px 1px 0px rgba(255,255,255,35), |
19 |
0px 1px 1px rgba(0,0,0,.2); |
20 |
-moz-box-shadow: |
21 |
inset 0px 1px 0px rgba(255,255,255,.35), |
22 |
0px 1px 1px rgba(0,0,0,.2); |
23 |
box-shadow: |
24 |
inset 0px 1px 0px rgba(255,255,255,.35), |
25 |
0px 1px 1px rgba(0,0,0,.2); |
26 |
|
27 |
-webkit-border-radius:4em; |
28 |
-moz-border-radius:4em; |
29 |
border-radius:4em; |
30 |
|
31 |
opacity:0; |
32 |
filter: alpha(opacity=0); |
33 |
|
34 |
-webkit-transition: .3s top ease-in, .3s opacity ease-in; |
35 |
-moz-transition: .3s top ease-in, .3s opacity ease-in; |
36 |
-o-transition: .3s top ease-in, .3s opacity ease-in; |
37 |
-ms-transition: .3s top ease-in, .3s opacity ease-in; |
38 |
transition: .3s top ease-in, .3s opacity ease-in; |
39 |
}
|
Step 9: Bubble Colors
Time for the final aesthetic touches on the bubbles; adding some CSS to style the colors. Remember the classes we added to the span tags? These will make things simple enough, we'll target each color, apply a gradient and a border color.
1 |
.pink { |
2 |
background-image: -webkit-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
3 |
background-image: -moz-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
4 |
background-image: -o-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
5 |
background-image: -ms-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
6 |
background-image: linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
7 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f78297', EndColorStr='#f46677'); |
8 |
|
9 |
border:1px solid #ce4f5e; |
10 |
}
|
11 |
.yellow { |
12 |
background-image: -webkit-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
13 |
background-image: -moz-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
14 |
background-image: -o-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
15 |
background-image: -ms-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
16 |
background-image: linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
17 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#feda71', EndColorStr='#feba48'); |
18 |
|
19 |
border:1px solid #dea94f; |
20 |
}
|
21 |
.blue { |
22 |
background-image: -webkit-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
23 |
background-image: -moz-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
24 |
background-image: -o-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
25 |
background-image: -ms-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
26 |
background-image: linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
27 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ace4f8', EndColorStr='#6ccdf3'); |
28 |
|
29 |
border:1px solid #79b5cb; |
30 |
}
|
Step 10: Hover Styles
Of course, our bubbles are beautifully styled, but completely invisible. We'll need to add some CSS to allow the bubbles to show on hover. First add some color to the anchor tags when they're hovered over, just a simple dark gray. Next we'll target the span when its parent list item is hovered over. We'll add an opacity of 1 to make it visible and change the top position value to make it appear as if it's sliding down.
1 |
.menu li:hover a { |
2 |
color: #343434; |
3 |
}
|
4 |
|
5 |
.menu li:hover a span { |
6 |
top:-1em; |
7 |
opacity:1; |
8 |
filter: alpha(opacity=100); |
9 |
}
|



So What About HTML5 Data Attributes?
Glad you asked..
Step 11: Change the Menu HTML Markup
To create our menu with HTML5 data attributes we'll first need to change our HTML Markup. We're going to use some custom attributes to create the bubbles. HTML5 introduced a new data- attribute where the attribute name can be anything as long as it's at least 1 character long and starts with 'data-'.
For this tutorial we'll use 'data-bubble'. These will allow us to store and access our notification values without adding unnecessary markup structure to our document. Notice we've also moved our color classes onto the anchor tags.
1 |
<div id="wrapper"> |
2 |
<ul class="menu"> |
3 |
<li><a href="#" class="pink" data-bubble="2">Profile</a></li> |
4 |
<li><a href="#" class="yellow" data-bubble="3">Setting</a></li> |
5 |
<li><a href="#" class="blue" data-bubble="6">Notifications</a></li> |
6 |
<li><a href="#">Logout</a></li> |
7 |
</ul>
|
8 |
</div>
|
Step 12: Removing Some CSS
As we're no longer going to be working with the span elements, you'll need to go back to your CSS and delete the following rules;
1 |
span { |
2 |
position:absolute; |
3 |
top:-2em; |
4 |
right: 0.5em; |
5 |
|
6 |
width: 1.5em; |
7 |
height: 1.5em; |
8 |
|
9 |
line-height:1.5em; |
10 |
text-align:center; |
11 |
|
12 |
font-family:"Helvetica Neue"; |
13 |
font-weight:bold; |
14 |
color:#fff; |
15 |
text-shadow:0px 1px 0px rgba(0,0,0,.15); |
16 |
|
17 |
-webkit-box-shadow: |
18 |
inset 0px 1px 0px rgba(255,255,255,35), |
19 |
0px 1px 1px rgba(0,0,0,.2); |
20 |
-moz-box-shadow: |
21 |
inset 0px 1px 0px rgba(255,255,255,.35), |
22 |
0px 1px 1px rgba(0,0,0,.2); |
23 |
box-shadow: |
24 |
inset 0px 1px 0px rgba(255,255,255,.35), |
25 |
0px 1px 1px rgba(0,0,0,.2); |
26 |
|
27 |
-webkit-border-radius:4em; |
28 |
-moz-border-radius:4em; |
29 |
border-radius:4em; |
30 |
|
31 |
opacity:0; |
32 |
filter: alpha(opacity=0); |
33 |
|
34 |
-webkit-transition: .3s top ease-in, .3s opacity ease-in; |
35 |
-moz-transition: .3s top ease-in, .3s opacity ease-in; |
36 |
-o-transition: .3s top ease-in, .3s opacity ease-in; |
37 |
-ms-transition: .3s top ease-in, .3s opacity ease-in; |
38 |
transition: .3s top ease-in, .3s opacity ease-in; |
39 |
}
|
40 |
|
41 |
.pink { |
42 |
background-image: -webkit-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
43 |
background-image: -moz-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
44 |
background-image: -o-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
45 |
background-image: -ms-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
46 |
background-image: linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
47 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f78297', EndColorStr='#f46677'); |
48 |
|
49 |
border:1px solid #ce4f5e; |
50 |
}
|
51 |
.yellow { |
52 |
background-image: -webkit-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
53 |
background-image: -moz-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
54 |
background-image: -o-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
55 |
background-image: -ms-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
56 |
background-image: linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
57 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#feda71', EndColorStr='#feba48'); |
58 |
|
59 |
border:1px solid #dea94f; |
60 |
}
|
61 |
.blue { |
62 |
background-image: -webkit-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
63 |
background-image: -moz-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
64 |
background-image: -o-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
65 |
background-image: -ms-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
66 |
background-image: linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
67 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ace4f8', EndColorStr='#6ccdf3'); |
68 |
|
69 |
border:1px solid #79b5cb; |
70 |
}
|
71 |
|
72 |
.menu li:hover a span { |
73 |
top:-1em; |
74 |
opacity:1; |
75 |
filter: alpha(opacity=100); |
76 |
}
|
Step 13: Adding Some CSS
Now let's target our data-attributes instead, we'll need to add some rules to our CSS.
It will look very similar to what we used for our span elements. This time though, we'll target the the :after pseudo elements of anchor tags with an attribute of "data-bubble". To do so we're using CSS Attribute Selectors.
As we're using an :after pseudo (and thereby generating content) we'll need to define some meat within it with content:''. Once again we'll use our custom attribute we created in our HTML and insert that.
Again, to manage the visibility of our bubble, we'll give it an opacity of 1 when the link is hovered over. Unfortunately, due to limitations with attribute selectors we cannot animate them with CSS itself.
1 |
.menu li a[data-bubble]:after { |
2 |
content:attr(data-bubble); |
3 |
position:absolute; |
4 |
top:-1.25em; |
5 |
right: 0.5em; |
6 |
|
7 |
width: 1.5em; |
8 |
height: 1.5em; |
9 |
|
10 |
line-height:1.5em; |
11 |
text-align:center; |
12 |
|
13 |
font-family:"Helvetica Neue"; |
14 |
font-weight:bold; |
15 |
color:#fff; |
16 |
text-shadow:0px 1px 0px rgba(0,0,0,.15); |
17 |
|
18 |
-webkit-box-shadow: |
19 |
inset 0px 1px 0px rgba(255,255,255,35), |
20 |
0px 1px 1px rgba(0,0,0,.2); |
21 |
-moz-box-shadow: |
22 |
inset 0px 1px 0px rgba(255,255,255,.35), |
23 |
0px 1px 1px rgba(0,0,0,.2); |
24 |
box-shadow: |
25 |
inset 0px 1px 0px rgba(255,255,255,.35), |
26 |
0px 1px 1px rgba(0,0,0,.2); |
27 |
|
28 |
-webkit-border-radius:4em; |
29 |
-moz-border-radius:4em; |
30 |
border-radius:4em; |
31 |
|
32 |
opacity:0; |
33 |
filter: alpha(opacity=0); |
34 |
}
|
35 |
.menu li:hover a[data-bubble]:after { |
36 |
opacity:1; |
37 |
filter: alpha(opacity=100); |
38 |
}
|
Step 14: Colors for Attributes
Finally, we need to style the generated content within the various classes so we can change the colors easily (exactly as we did with the span elements).
1 |
a.pink[data-bubble]:after { |
2 |
background-image: -webkit-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
3 |
background-image: -moz-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
4 |
background-image: -o-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
5 |
background-image: -ms-linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
6 |
background-image: linear-gradient(top, rgb(247, 130, 151), rgb(244, 102, 119)); |
7 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#f78297', EndColorStr='#f46677'); |
8 |
|
9 |
border:1px solid #ce4f5e; |
10 |
}
|
11 |
a.yellow[data-bubble]:after { |
12 |
background-image: -webkit-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
13 |
background-image: -moz-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
14 |
background-image: -o-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
15 |
background-image: -ms-linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
16 |
background-image: linear-gradient(top, rgb(254, 218, 113), rgb(254, 186, 72)); |
17 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#feda71', EndColorStr='#feba48'); |
18 |
|
19 |
border:1px solid #dea94f; |
20 |
}
|
21 |
a.blue[data-bubble]:after { |
22 |
background-image: -webkit-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
23 |
background-image: -moz-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
24 |
background-image: -o-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
25 |
background-image: -ms-linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
26 |
background-image: linear-gradient(top, rgb(172, 228, 248), rgb(108, 205, 243)); |
27 |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#ace4f8', EndColorStr='#6ccdf3'); |
28 |
|
29 |
border:1px solid #79b5cb; |
30 |
}
|
Conclusion
We've successfully created a menu along with some neat notification bubbles and animated them! We've even gone further and taken advantage of new techniques within HTML5.



I hope you enjoyed this tutorial, thanks for reading!