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 use CSS to realize mouse hover prompt

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly shows you "how to use CSS to achieve mouse hover prompt", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use CSS to achieve mouse hover prompt" this article.

This is a relatively beautiful mouse hover prompt effect, with pure CSS code to achieve, the mouse over the picture will show a layer, that is, hovering tips, in this prompt box you can also add a picture or a list, which depends on your play, prompt box background color and text color you can adjust.

The code is as follows:

Mouse hover prompt effect

* {

Margin:0

Padding:0

}

Div {

Margin:130px

List-style:none

}

Div img {

Border:0

}

Div a {

Color:#fff

Text-decoration:none

Position:relative

Display:block

}

Div span {

Font-size:12px

Display:none

}

Div a:hover {

Background:

}

Div a:hover span {

Padding:3px

Background:skyblue

Color:#fff

Font-size:9pt

Border-width:1px 2px 2px 1px

Border-color:#333

Border-style:solid

Position:absolute

Top:-30px

Left:0

Display:block

}

Welcome to visit us often!

The above is all the content of this article "how to use CSS to achieve mouse hover prompt". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, 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: 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