+ 1
ummmm...
How can you make it so in CSS that if you hover over one element, then another element will change?
4 Answers
+ 2
you can influence the element if it's a next sibling
<style>
p:hover + h1{
color:red;
font-size:4rem;
transform: translate(20px,-100px) rotate(-30deg);
transition:.5s;
}
</style>
<p>hover me</p>
<h1>wow</h1>
but you will have to use javascript or jquery if you want to control unrelated elements...
0
use the pseudo selector
:hover
for instance:
a { }
a:hover { }
img { }
img:hover { }
I hope this helps
0
I know this, I just have a question: is it possible to make it so that when you hover over one element, the other changes?