Search
 
SCRIPT & CODE EXAMPLE
 

CSS

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>
Comment

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>
Comment

use css to replace icon with text when hover

@import url("https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css");

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    right: 0;
}
.nav li {
    font-size:12pt;
    display:block;
    float: left;
    height:90px;
    width: 145px; /*new*/
    text-align: center; /*new*/
    transition: all 0.2s ease-in-out;
}
.nav .home {
    background: #a3d39c;
}
.nav .about {
    background: #7accc8;
}
.nav .projects {
    background: #4aaaa5;
}
.nav .contact {
    background: #35404f;
}
.nav li a {
    font-family: FontAwesome;
    color:#eee;
    font-size:22pt;
    text-decoration: none;
    display: block;
    padding:15px;
}
.nav li i {
    color:#fff;
    padding:0 10px;
}
.nav li b {
    padding: 15px 0;
    display: none;
}
.nav a:hover {
    color: #fff;
}
.nav a:hover i {
    display: none;
}
.nav a:hover b {
    display: block;
}
Comment

PREVIOUS NEXT
Code Example
Css :: ellipsis css 
Css :: cursor as image css 
Css :: material icons after css 
Css :: html file upload without browse button 
Css :: circle css 
Css :: css prevent background scrolling 
Css :: backdrop css 
Css :: how to remove lines from textarea 
Css :: space-evenly vs space-around 
Css :: css chevron arrow 
Css :: remove the dotted border on links 
Css :: live sass compiler settings 
Css :: css selector label for 
Css :: can i use css in react native 
Css :: wordpress remove sticky header 
Css :: sass import variable from another file 
Css :: what does align items center do 
Css :: how to make a list vertical in css 
Css :: css remove highlight on input text 
Css :: css put background on top of another background image 
Css :: $scope.$apply 
Css :: css image hover 
Css :: font weight 
Css :: input type (submit, button, reset) css 
Css :: change background color on hover 
Css :: how to add dotted line after and before text in css 
Css :: css h sizes 
Css :: Cambiar el color de texto al hacer scroll css 
Css :: lightning color code 
Css :: for...in...loop 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =