I'm trying to achieve similar effect as listed here - https://www.harrythehirer.com.au/
This is what I have so far, but as you can see it's not complete.
Even though I've set opacity of li
child to 0
, when you hover in the blank area it activates the hover.
div.section-44 {
text-align: center;
}
div.section-44 span {
display: inline-block;
vertical-align: middle;
}
div.section-44 ul {
padding-left: 0px;
}
div.section-44 ul li {
list-style-type: none;
background: red;
padding: 20px 40px;
color: #fff;
border-radius: 50px;
}
div.section-44 ul li:nth-child(1), div.section-44 ul li:nth-child(2), div.section-44 ul li:nth-child(4), div.section-44 ul li:nth-child(5) {
opacity: 0;
}
div.section-44 ul:hover li {
opacity: 1;
}
<div class="section-44">
<h2>
<span>I want </span>
<span>
<ul>
<li><a href="#">to do A</a></li>
<li><a href="#">to do B</a></li>
<li><a href="#">to do C</a></li>
<li><a href="#">to do D</a></li>
<li><a href="#">s</a></li>
</ul>
</span>
</h2>
</div>
Here's the jsfiddle -> https://jsfiddle.net/shutup/vrw0zp7L/16/
Any help is highly appreciated.
Thanks.