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.
Loading...
Related Quiz
- CSS variables can be updated in real-time using ________ which makes them powerful for dynamic theming.
- The ________ property in CSS Grid is used to create an explicit number of rows in a grid layout.
- When optimizing a website for high-DPI displays, what considerations should a developer keep in mind when selecting and integrating images and graphics?
- Which CSS framework uses utility classes as its core approach to styling?
- What is the total width of an element (including padding and border) when the 'box-sizing' property is set to 'content-box'?