R
R
Raul Abdullin2018-02-14 23:58:44
css
Raul Abdullin, 2018-02-14 23:58:44

How can I make the color of both the title and the paragraph change when hovering over the block?

I am attaching a screenshot. I set a separate hover for the white box, a separate hover for the title, and a separate hover for the paragraph.
Task: to make it so that when you hover over a white box, the color changes to white and the paragraph and heading.
Here's how I did:

.section-service:hover {	
  background-color: #FB7DA4;
  background-image: linear-gradient(to right, #FBA9A2, #FB7DA4);
}

.section-service h3:hover, .section-service p:hover {
  color: #fff;
}

5a84a2fe97fd8008425416.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-02-15
@raulvodov

.section-service:hover h3,
.section-service:hover p {
color: #fff;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question