In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how not to use external CSS style to achieve hover mouse hover change related knowledge, the content is detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that you do not use external CSS style how to achieve hover mouse hover change article will have a harvest, let's take a look at it.
In the construction of DIV+CSS pages, occasionally we cannot directly apply the external CSS style control DIV format, such as configuring the a:hover entry for a.
You can use onMouseOver (mouse over indicator) and onMouseOut (after mouse move target) to configure the hover pattern for a tag or other html tags.
You can apply it directly to the tag, regardless of A tag, SPAN tag, DIV tag, etc.
CSS5
The above a hyperlink code configuration default pattern, mouse over the index, mouse away from the policy format. The natural color code is longer than the photo.
CSS5 important note: in order to see the mouse removed to communicate with the default design and color, it is usually necessary to directly use the style to configure the default CSS pattern on the label and maintain the opposite CSS format with the onMouseOut setting equipment. In order to avoid the initial shape of the object style and the mouse away from the object after the name is different.
As in the above code:
Style= "color:#00F; text-decoration:none"
Vs.
OnMouseOut= "this.style.color='#00F';this.style.textDecoration='none'"
Set the equipment to allow font color sampling of # 00F and do not show underlining.
Through the example hover and do not need internal hover to complete the hover trick setting case as follows
1. Broken external CSS case presentation code:
CSS5 instance .ABC a {color:#00F; text-decoration:none} / * default abc box hyperlink pen and ink font color is blue without underscore * / .ABC a:hover {color:#F00; text-decoration:underline} / * the font color is red after the hyperlink text in the abc box is red underlined * / .bb {color:#00F} .BB: hover {color:#F00 Font-weight:bold} / * configure hover directly to the bb object box * / send off to visit the CSS5 site! Allow me to be blue, turn red and bold when hovering over the mouse.
2. Screenshot and illustration of the HTML code and the effectiveness of the hunter.
3. External CSS fancy converted HTML source code
CSS5 instance Welcome to visit CSS5 website! Allow me to be blue, change red and bold when hovering over the mouse.
4. Use onMouseOver and onMouseOut to complete screenshots in external CSS hover format
This is the end of the article on "how to change the hover mouse hover without using external CSS styles". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve hover mouse hover change without using external CSS style". If you want to learn more knowledge, welcome to follow 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: 262
*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.