Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set the CSS style change when you hover or pass over an object

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you about the mouse over or over the object when the CSS style changes how to set the relevant knowledge points, detailed content, clear logic, I believe that most people still know too much about this knowledge, so share this article for your reference, I hope you can learn something after reading this article, let's take a look at it.

Hover pseudo-class configuration name mouse hover over the end form

When the mouse hovers or passes through the object, the CSS pattern changes to set the equipment equipment, which is common in setting the CSS name when the mouse hovers over the A hyperlink tag.

A:hover {color:#F00; background:#CCC}

When you set the hyperlink An object mouse over, the font color of the A hyperlink object is changed to red, and the mountain color is grayish black.

Span:hover {color:#F00}

The font hue changes to red when the mouse hovers or passes over the span tag object.

Hope: previously on the non-a hyperlink tag set IE6 is not compatible with hover, but when the use of IE6 contrast dense, you can not consider that IE6 is compatible with non-a tag hover.

A tag setting equipment hover I think we all know that the same is true for other tag equipment, just name the class or id configuration.

Non-A tag element configuration hover.abc {color:#000; bac kg round:#FFF} .abc: hover {color:#F00;bac kg round:#CCC} default font hue in this class=abc object is color, and the background is pure white

Screenshot of the reverse effect of font hue and background color when the mouse hovers over the div class=abc competitive object

These are all the contents of this article entitled "how to set CSS style changes when you hover or pass over an object". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report