A developer needs to create a user interface element that changes its border color when hovered over, while keeping the same border size and style. What combination of CSS properties should they use?

  • border, border-hover, color-hover
  • border, hover, color
  • border-color, hover-color, border-style
  • border-hover-color, border-hover-style, border-hover-width
To achieve the desired effect, the developer should use the border-color property along with the :hover pseudo-class. For example: border-color: initial; border-color: red; This ensures that only the color changes on hover while keeping the other border properties intact.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *