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 mouse forbidden style by css3

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly explains "how to set mouse prohibition style in css3". The explanation content in this article is simple and clear, easy to learn and understand. Please follow the idea of Xiaobian and go deep into it slowly to study and learn "how to set mouse prohibition style in css3" together!

In css, you can use the "cursor" attribute to set the prohibited mouse style. This attribute is used to set the cursor shape displayed by the mouse. When the value of the attribute is set to "not-allowed", you can set the mouse to the prohibited style. The syntax is "element {cursor:not-allowed;}".

Operating environment of this tutorial: Windows 10 system, CSS3 && HTML5 version, Dell G3 computer.

CSS3 How to Set Mouse Forbidden Style

In css, to set the forbidden style of mouse, you need to use the cursor attribute.

The cursor property specifies the type (shape) of cursor to display.

This property defines the cursor shape used when the mouse pointer is placed within an element boundary

Simply add a cursor:not-allowed; style to the element to set the mouse style to the forbidden style when the mouse is over the element.

Examples are as follows:

Document div{ cursor:not-allowed; width:150px; height:150px; border:1px solid #000; }

Output:

Thank you for reading, the above is "css3 how to set the mouse ban style" content, after the study of this article, I believe we have a deeper understanding of how to set the mouse ban style of css3, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

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