How to Create a Pure CSS3 Menu with Opacity Animation

In today’s tutorial, I will be teaching you how to create a pure css3 menu with opacity animation. For the smooth animation effect we will be using the CSS3 transition property ease-in-out which unfortunately is not supported for IE9 and earlier. However, I will also be using the CSS3 opacity property as well as the filter property to support IE8 and earlier for our standard opacity hover effect. Let’s get started!


Step 1: Creating the Markup

First we will need to create a brand new index.html file and create our basic markup.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
    <title>Create a Pure CSS3 Animated Menu</title>
    
    <link rel="stylesheet" href="styles.css" />
    
</head>
<body>
    <div class="menu">
        <ul>
            <li><a class="purple" href="">Home</a></li>
            <li><a class="green" href="">About</a></li>
            <li><a class="blue" href="">Services</a></li>
            <li><a class="pink" href="">Portfolio</a></li>
            <li><a class="orange" href="">Contact</a></li>
        </ul>
    </div>
</body>
</html>

If you open your index.html file now you should be left with a simple unordered list like this:

Create a Pure CSS3 Menu with Opacity Animation | Step 1


Step 2: Creating the General Styles

First we need to create a brand new styles.css file and create some general styles to get us started.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
* {
    margin: 0;
    padding: 0;
}
body {
    background: #111;
    color: #FFF;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: 20px;
}
ul, li { list-style-type: none; }
a {
    color: #FFF;
    text-decoration: none;
}

Your index.html file should now look like this when opened:

Create a Pure CSS3 Menu with Opacity Animation | Step 2


Step 3: Creating the Menu Styles

Still using our styles.css we will begin to style the menu starting with the anchor tag classes used in the markup by giving them each background colors.

1
2
3
4
5
.blue { background: #009FE3; }
.purple { background: #574696; }
.orange { background: #EE7202; }
.pink { background: #E61C67; }
.green { background: #96C11F; }

Your index.html file should now look like this when opened:

Create a Pure CSS3 Menu with Opacity Animation | Step 3a


Next we will style our the div.menu giving it a fixed width and margin of auto to center it on the page. We will also float the list items left so they become horizontally listed, give them a margin of 4px and align the text centered on their backgrounds.

1
2
3
4
5
6
7
8
9
10
.menu {
    width: 940px;
    margin: 40px auto;
}
.menu li {
    float:left;
    margin: 4px;
    text-align: center;
}

Your index.html file should now look like this when opened:

Create a Pure CSS3 Menu with Opacity Animation | Step 3b


Finally we will style the menu list anchor tags and create our CSS3 opacity and CSS3 transition effects.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.menu li a {
    width: 180px;
    line-height: 60px;
    display: block;
    
    /* Set the opacity */
    opacity: 0.5;
    filter: Alpha(opacity=50); /*IE8 and earlier*/
    
    /* Create the animation */
    -o-transition: all 0.4s ease-in-out;
    -moz-transition: all 0.4s ease-in-out;
    -webkit-transition: all 0.4s ease-in-out;
    transition: all 0.4s ease-in-out;
}
.menu li a:hover {
    /* Set the hover opacity */
    opacity: 1.0;
    filter: Alpha(opacity=100); /*IE8 and earlier*/
}

Final Result:

Create a Pure CSS3 Menu with Opacity Animation | Final Result

9 Advanced Pokemon GO Hacks

If you are new to Pokémon, and you are looking to learn some tips, you are in the right place. With this article, you are going to find out how to find them, capture and keep them. And for the professionals, you can an learn and extra Pokemon go hack or two from the article and boost your skills.

pokemon go hack

Pokemon Go Hack and tips

Make Capturing Easier by turning off AR.

Having the AR on when capturing the Pokémons is part of the fun especially when going for the wild ones. If you have been at it a while, you notice that Pokémons don’t like you pointing cameras at them. They will make capturing difficult by hopping around randomly. I wonder how you look to the real life world.

However, you can turn off the AR and ease up the work. The Pokémon settle down in one position and will occasionally hope to make it challenging, but at least now you can focus and capture them.

Summon Nearby Pokémon

When walking around have you noticed the Pokémon silhouettes on your map? What could they possibly be? Maybe Pikachu! Not really. These are wild Pokémons that are near you. Tap the tab and it will display all the Pokémons around you. From the list, you can choose one Pokémon to track down. Notice that ass you come near a Pokémon the footsteps on the screen reduce. You are making progress. If the footprints are increasing as you walk, you should probably turn the other way.

Trade in duplicates

If you have two or more Pokémons of the same type, there is no point in keeping them. Trade them in with Professor will low to increase your XP and level up. You will receive candy from the professor which you can use to evolve stronger Pokémons.

Study the Moves

You might come across two Pokémons with the same CP. To make the best decision, examine the moves of the two Pokémons. Check the power levels of the moves and the kind of weapons the Pokémons have. Go for the one with the better moves.

Next to each move set you will also notice the amount of damage they can inflict, there is also a blue bar that lets you know when you can use your second set of moves. Go for more power, better moves and better Pokémons.

Pokeball 101

Among the Pokemon go hack, this is one you should definately learn. When capturing Pokémons, you can throw a curve ball that will earn you more points. Just jiggle the ball superbly. Do this by tapping the ball, rotate it in a clockwise or anticlockwise until it starts to sparkle. After this, just toss it and boom. A new Pokémon and some extra points.

pokemon-go-cheats

Dispose Potions!

For the trigger happy player who let Pokeball fly off, you are bound to run ou of the balls. There is no need in keeping you inventory full of potions when you can walk to any poke stop and refill on them. Toss some of the portions to give some space for more poke balls.

Look out for petals.

When you visit a pokestops and notice some falling pink petals, it means that someone has left a lure in that spot. You should stay there for the next 30 minutes to avoid missing out on the hunt.

Keep the app running to hatch eggs.

If you are wondering why your eggs are not hatching even though you’ve walked all over town, it’s probably because your app is not running in the background. The app needs to stay running to keep track of the distance you are covering.

Use lures.

Instead of buying poke balls, buy lures and incense instead. You can always get more Pokeball in pokestops. Invest in some incense that will allow you to attract Pokémons to you for 30 minutes. Make the hunt easier. Right?

Conclusion.

The above Pokemon go tips will help you play like a professional. They cover the basic gameplay of the game which involves luring, catching, keeping and gaining higher XP. Be a pro through all these stages.

Create an Expanding Search Input Field Using CSS3

In this tutorial I will be showing you how to create an expanding search field using CSS3 transitions. The search field will simply expand on focus and contract when unfocused. We will also use the CSS3 box-shadow property on focus to give it some more detail and allow the user to be very aware when it is active and inactive when unfocused. There will be two examples in this tutorial. One that expands 100% of the available space and one that expands to a fixed width of 400px. Lets get started!


Assets used in this tutorial:

  • Search Icon

Step 1: Creating the Markup

First we need to create a new index.html file and create some basic HTML markup for the forms.

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
32
33
34
35
36
<!DOCTYPE html>
<html>
<head>
    <title>Expanding Search Input Field Using CSS3 | TutorialBasement</title>
    <link rel="stylesheet" href="styles.css" />
</head>
<body>
    <div id="wrapper">
        <p>Full Width Expanding</p>
        <form id="search-form" name="search-form" method="get" action="index.html">
            <div class="container">
                <input type="text" name="s" id="s" class="search-field-1" placeholder="Search...">
                <input type="submit" name="search-button-1" id="search-button-1" value="">
            </div><!-- end .container -->
        </form>
        <p>Fixed Width Expanding</p>
        <form id="search-form-2" name="search-form-2" method="get" action="index.html">
            <div class="container">
                <input type="text" name="s2" id="s2" class="search-field-2" placeholder="Search...">
                <input type="submit" name="search-button-2" id="search-button-2" value="">
            </div><!-- end .container -->
        </form>
    </div><!-- end .wrapper -->
</body>
</html>

Opening index.html in browser now we will be left with two unstyled forms like this:

Expanding Search Input Field Using CSS3 | Step 1


Step 2: Creating General Styles

Next we need to create a brand new styles.css file and put it in the same directory as our index.html. Then we will create some general styles such as body, the div wrapper and paragraph.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
body {
  background: #e1e1e1;
  color: #252525;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 20px;
}
#wrapper {
  width: 750px;
  margin: 40px auto;
  padding: 20px;
  background: white;
  border-radius: 20px;
  border: 1px solid #d7d7d7;
}
p { color: #777; margin-bottom: 20px; }

Opening index.html in browser now you will have this:

Expanding Search Input Field Using CSS3 | Step 2


Step 3: Styling the Search Forms, Container and Search Fields

Next we will set the search forms to display as block and give them a margin bottom of 15px. Then we will give the fields container a position of relative. Finally we will style both the search fields at there normal states.

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
32
33
34
35
36
/** Search Forms and Container **/
#search-form-1, #search-form-2 {
  display: block;
  margin-bottom: 15px;
}
.container { position: relative; }
/** Search Fields **/
.search-field-1, .search-field-2 {
  display: block;
  width: 265px;
  padding: 13px 13px;
  padding-right: 40px; /* Keeps input text from running over the search button */
  background-color: #fff;
  font-size: 14px;
  color: #ccc;
  border: 4px solid #f4f4f4;
  /* CSS3 Box Sizing */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  /* CSS3 Rounded Corners */
  border-radius: 20px;
  /* CSS3 Transition (Expanding Effect) */
  -webkit-transition: all 0.4s linear;
  -moz-transition: all 0.4s linear;
  -o-transition: all 0.4s linear;
  -ms-transition: all 0.4s linear;
  transition: all 0.4s linear;
}

Opening index.html now we have our normal state fields:

Expanding Search Input Field Using CSS3 | Step 3


Step 4: Create the Search Field Focus Styles

Next we will style both the search field examples focus states. Only difference here is full width will have a width of 100% while fixed width will have a set width of 400px.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/** Search Field 1 Focus (Full Width) **/
.search-field-1:focus {
  outline: none;
  width: 100%;
  color: #666;
   
  /* CSS3 Outer Shadow */
  -webkit-box-shadow: 0 0 0 10px #999;
  -moz-box-shadow: 0 0 0 10px #999;
  box-shadow: 0 0 10px #999;
}
/** Search Field 2 Focus (Fixed Width) **/
.search-field-2:focus {
  outline: none;
  width: 400px;
  color: #666;
  /* CSS3 Outer Shadow */
  -webkit-box-shadow: 0 0 0 10px #999;
  -moz-box-shadow: 0 0 0 10px #999;
  box-shadow: 0 0 10px #999;
}

Opening index.html now and clicking on the forms we can now see the expanding effect:

Expanding Search Input Field Using CSS3 | Step 4


Step 5: Creating the Search Button Styles

Finally we will style the search buttons normal state and hover states. I’ve applied a 50% opacity to them at normal state and 100% opacity on focus as well as a css3 transition to make a smooth hover effect. Then we need to re-position them on focus.

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
32
33
34
35
36
37
/** Search Buttons **/
#search-button-1, #search-button-2 {
  background: transparent url('search-icon.png') center left no-repeat;
  position: absolute;
  right: 505px;
  top: 16px;
  height: 16px;
  width: 16px;
  border: 0;
  cursor: pointer;
  /* Set Opacity to 50% on buttons */
  filter: alpha(opacity=50); /* IE */
  opacity: 0.50;
  /* CSS3 Transition */
  -webkit-transition: all 0.4s linear;
  -moz-transition: all 0.4s linear;
  transition: all 0.4s linear;
}
/* Set Opacity to 100% on focus/hover of buttons */
#search-button-1:hover, #search-button-1:focus,
#search-button-2:hover, #search-button-2:focus {
  filter: alpha(opacity=100); /* IE */
  opacity: 1.0;
}
/* Button position on Full Width field after it expands */
.search-field-1:focus + #search-button-1 {
  right: 20px;
}
/* Button position on Fixed Width field after it expands */
.search-field-2:focus + #search-button-2 {
  right: 370px;
}

Final Result:

Expanding Search Input Field Using CSS3 | Final Result

How to Style HR Tag to Create Separators

Using the HR Tag for separators in it’s default style is depressing on any design. For some beginner web designers you may not know we can style HR tag. You are however limited to what you can actually accomplish with CSS only. For this short tutorial I will be teaching you a few very simple examples of doing this as well as sharing the source that will include a few more examples you can check out using some CSS3 properties to create shadows and gradients. We will be styling a basic colored separator and a beveled separator using CSS styles only. Then we will create a separator using a repeating image. Lets gets started!


Assets used in this tutorial:

  • Separator Pattern (Image)

Step 1: Creating the Markup

Create a brand new index.html file and we will begin with some basic HTML markup containing a div wrapper and a few hr tags with classes relevant to their styling for this tutorial.

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
<!DOCTYPE html>
<html>
<head>
    <title>Style HR Tag to Create Separators</title>
    <link rel="stylesheet" href="styles.css" />
</head>
<body>
    <div id="wrapper">
        <p>Basic Color Style</p>
        <hr class="color" />
        <br /><br />
        <p>Bevel Style</p>
        <hr class="bevel" />
                <br /><br />
        <p>Image Style</p>
        <hr class="image" />
    </div>
</body>
</html>

Your index.html should now look like this when opened:

Style HR Tag to Create Separators | Step 1


Step 2: Create General Styles

Next we need to create a brand new styles.css in the same directory as index.html and we will create our general styles to the markup including the body, the div wrapper, and our paragraph text.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
body {
    background: #e1e1e1;
    color: #252525;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: 20px;
}
#wrapper {
    width: 960px;
    margin: 40px auto;
}
p {
        color: #777;
        margin-bottom: 20px;
        text-align: center;
}

You will be left with this now:

Style HR Tag to Create Separators | Step 2


Step 3: Creating the Basic Color Separator

First we will remove the border from HR itself as well as add a margin-bottom to give it breathing room. Then we will create the color class give it a height of 1px (or however large you want it) and set the background to your choice of color, in this example I will be using #C9C9C9.

1
2
3
4
5
6
hr { margin-bottom: 50px; border: 0; } /* For all HR tag */
hr.color {
    height: 1px;
    background: #c9c9c9;
}

If we open our index.html now you can see we have now created a basic colored separator for the color class:

Style HR Tag to Create Separators | Step 3


Step 4: Creating the Bevel Separator

Now we will create one of those awesome looking bevel separators I’m sure you have seen on plenty of websites throughout the internet. It will consist of a border-top and a border-bottom each given their own color one light and one dark to create the bevel effect. I will be using #F4F4F4 for the border-top and #C9C9C9 for the border-bottom. These colors will vary based on your page background color, so you will need to play around with them to replicate the effect on another background color, but the method stays the same.

1
2
3
4
hr.bevel {
    border-top: 1px solid #c9c9c9;
    border-bottom: 1px solid #f4f4f4;
}

If we open our index.html now you can see we have now created an awesome bevel separator for the bevel class:

Style HR Tag to Create Separators | Step 4


Step 5: Creating the Image Separator

Now we will create a separator using a repeatable image, this method is a little more flexible as obviously you have to freedom to design it as you please. Download the sep-pattern.png included in assets at the top and place it in the same directory as the index.html and styles.css files. Then we will create our image class, use the image as background and repeat-x so it repeats horizontally. Then we will give it a height of 8px as the sep-pattern is 8px in height and we want to display then entire image.

1
2
3
4
hr.image {
    background: url(sep-pattern.png) repeat-x;
    height: 8px;
}

If we open our index.html now you can see we have now created our last separator and the image class is now in effect and repeating accross the available space:

Style HR Tag to Create Separators | Step 5


All Included Examples in Source Download

Style HR Tag to Create Separators | All Included Examples in Source Download