Pure CSS Add active class to hover effects

Pure CSS Add active class to hover effects

In this Post We Will Explain About is Pure CSS Add active class to hover effects With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Add Active Navigation Class Based on URL Example

In this post we will show you Best way to implement Add Active Navigation Class Based on URL, hear for CSS Add Active Class to a Navigation Menu Based on URL with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

index.html


Pure CSS Add active class to hover effects

style.css

body {
    padding: 50px;
}
ul {
    border: 2px solid #444;
    display: inline-block;
    height: 302px;
    position: relative;
    width: 400px;
}
li {
    font: bold 16px/100px sans-serif;
    height: 100px;
}
a {
    border-right: 2px solid #444;
    border-top: 2px solid #444;
    color: #c60000;
    display: block;
    text-align: center;
    text-decoration: none;
    width: 99px;
}
li:first-child a {
    border-top: none;
}
li:nth-child(2) a {
    color: yellow;
}
li:nth-child(3) a {
    color: black;
}
a:hover {
    background: #c60000;
    color: #ffffff;
}
li:nth-child(2) a:hover {
    background: yellow;
    color: #ffffff;
}
li:nth-child(3) a:hover {
    background: black;
    color: #ffffff;
}
img {
    background: #c60000;
    display: none;
    height: 302px;
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
}
li:nth-child(2) img {
    background: yellow;
}
li:nth-child(3) img {
    background: black;
}
a:hover + img,
img:hover {
    display: block;
}

Pure CSS Image with Caption Hover Effect

You are Most welcome in my youtube Channel Please subscribe my channel. and give me FeedBack.
More Details……
Angularjs Example

Example

I hope you have Got What is CSS Add Active Class to a Navigation Menu Based on URL And how it works.I would Like to have FeedBack From My Blog(Pakainfo.com) readers.Your Valuable FeedBack,Any Question,or any Comments about This Article(Pakainfo.com) Are Most Always Welcome.

Leave a Comment