Forum Academy Marketplace Showcase Pricing Features

Adjusting this HTML to trigger once group is hovered

Hi guys!

I found this cool HTML somewhere in the forum which creates a word (in this case “Cool Line”) that has an animated underline when hovered:

<style>    

h1 { color: #666;display:inline-block; margin:0;text-transform:uppercase; }
h1:after {
	display:block;
	content: '';
	border-bottom: solid 3px #019fb6;  
	transform: scaleX(0);  
	transition: transform 250ms ease-in-out;
	padding-bottom: 3px;  
}

h1:hover:after { transform: scaleX(1); }

</style>
    
<h1 class="fromCenter">Cool Line</h1><br/>

Is it possible for that text to become underlined once something else is hovered instead, like a group that this HTML sits within?

Thanks!!