change text to icon on hover css code example

Example 1: use css to replace icon with text when hover

<div class="nav">
    <ul>
        <li class="home">
        	<a href="index.html"><i class="icon fa fa-home fa-2x"></i><b>Home</b></a>
        </li>
        <li class="about">
        	<a href="about"><i class="icon fa fa-coffee fa-2x"></i><b>About</b></a>
        </li>
        <li class="projects">
        	<a href="#projects"><i class="icon fa fa-code fa-2x"></i><b>Projects</b></a>
        </li>
        <li class="contact">
        	<a href="#contact"><i class="icon fa fa-comment fa-2x"></i><b>Contact</b></a>
        </li>
    </ul>
</div>

Example 2: use css to replace icon with text when hover

<li class="home">
    <a href="index.html"><i class="icon fa fa-home fa-2x"></i><b>Home</b></a>
</li>

Tags:

Css Example