Skip to main content

你好,我如何做才能让鼠标放到元素上面时,背景颜色改变时,文字颜色变成白色

Comments

1 comment

  • Ariel H.

    Hi,

    Thank you for contacting us.

    To achieve this effect, you need to create a column within another column or row within a row.

    The outer column/row will have the border and mouse hover effect, while the inner column will contain the icon and text.

    Assign a class to the inner column/rom, for example, "card."

    To ensure the text and icon elements inside the inner column turn white on hover, use the following CSS:

    .card:hover *{
        color: white !important;
    }

    This is demonstrated on this screencast: https://youtu.be/VETHqV3AHOI

    Please try this and let me know how it goes.

     Best regards,
     Ariel H.

    0

Please sign in to leave a comment.