CSS Hover Selector: How to Style Elements on Mouseover
The CSS hover selector is used to select and style an element when the user hovers over it with their mouse pointer. It is written as follows:
selector:hover {
property: value;
}
For example, to change the color of a link when the user hovers over it, you would write:
a:hover {
color: red;
}
When the user hovers over the link, the text color will change to red. You can also use the hover selector with other CSS properties, such as 'background-color', 'font-size', and 'border'.
原文地址: https://www.cveoy.top/t/topic/mInO 著作权归作者所有。请勿转载和采集!