In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to realize the mouse through the text background color or picture change". In the operation of the actual case, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The link text has no background and the background color appears after hovering over the mouse.
When the mouse passes over a text hyperlink without background color and background picture (hover), the background color of the hyperlink anchor text appears.
Use the CSS attribute word:
Background+ specific color value
We use an example to change the background color of the mouse through a link css. We add a div box css to the hyperlink a tag and name it ".-abc".
1. Complete example HTML source code
A background color change.-abc a {color:#000} / * css Note: the hyperlink color is black * /.-abc a:hover {background:#00F; color:#FFF} / * css Note: the font color is white when you hover over the hyperlink, and the background is blue * / Welcome to
2. Screenshot of an example where the background color is changed
The background color of "a:hover" appears as blue when the mouse is over by setting the a tag above.
Second, the mouse changes into a picture after a text link to the background
When the mouse passes over the hyperlinked text, the text background uses the picture as the background.
We use an example to change the background of the mouse after a link to a picture, and we add a div box css to the hyperlink a tag and name it ".-def"
1. Complete HTML+css code
A background change.-def a {color:#000; padding:10px 10px; line-height:30px} / * css Note: the hyperlink color is black * /.-def a:hover {color:#FFF; background:url (bj.gif) no-repeat center} / * css Note: the font color is white when the mouse is over the hyperlink, and the background is the picture * / Welcome to
2. the text link mouse changes to a screenshot of a picture example after the background is changed.
This is the end of the content of "how to realize the mouse to change the background color or picture of the text". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.