当前位置: 首页 > 工具软件 > CSS-Only Chat > 使用案例 >

html如何给block设置title,html - CSS Hover - Change Title, Description and Background when hovering over b...

壤驷深
2023-12-01

I have the following CSS items that I am trying to simultaneously change the hover effect for when rolling over .blocks-item

.blocks-item

.blocks-item-title

.blocks-item-description

.blocks-item-link

I have set .blocks-item:hover to the following:

.blocks-item:hover {

background: #f8f8f8;

color: #15191f;

}

If I do the following:

.blocks-item:hover,

.blocks-item-title:hover {

background: #f8f8f8;

color: #15191f;

}

Then the title only changes colour when rolled over with the mouse which I am expecting.

I am trying to bind all of the 4 elements so that I only need to hover over .blocks-item to be able to change the hover effect of all of the other items (description, title, link)

What is the best way of going about this?

I know this has been answered many times but struggling to adapt the solutions.

Appreciate the understanding and help

HTML:

  • Create Ticket

    Submit a tracked ticket for any IT queries or issues here

  • Call Us

    Our call centre is available 24/7 to help with issues and queries

  • Live Chat

    Our live chat service is available from 8am - 8pm Monday - Friday

  • Email

    For non-urgent issues, queries or general enquiries. We will respond within 24 Hours

 类似资料: