The cursor attribute specifies the type (shape) of the cursor to be displayed. This property defines the cursor shape used when the mouse pointer is placed within the bounds of an element (although CSS2.1 does not define which bounds determine this range).
When we layout DIV CSS, we will encounter the control of the mouse pointer cursor within the object, such as the mouse passing through the pointer and changing into a finger shape. Next, we introduce the mouse pointer style cursor control. In addition to the system default mouse pointer style, you can set the image as the mouse pointer through CSS. It is common for some websites to have various small image styles for the mouse pointer. Of course, this is to set the mouse style through css cursor.
The cursor attribute specifies the type (shape) of the cursor to be displayed
2. Detailed explanation of css cursor url usage format
css cursor url usage format: css:{cursor:url('icon path'),auto;} //IE,FF,chrome All browsers can
Example code:
html{cursor: url("ued.taobao.com/blog/wp-content/themes/taobaoued/images/cursor.ico"),auto;}
Analysis: The previous url is a custom mouse icon path, and the second parameter auto is the css standard cursor style, which can be replaced by other attributes ( Such as pointer/default, etc.)!
auto: normal mouse
crosshair: crosshair mouse
default: default mouse
pointer: point mouse (hand, two are written to take care of IE5, which only recognizes hand.)
move: move the mouse
4. About cursor settings Image issues
Several things to note: 1. The image address is an absolute path, 2. The image size is best 32*32, anyway, the size parsed under each browser is different.
url The URL of the custom cursor to be used.
Note: Always define a normal cursor at the end of this list in case there is no available cursor defined by URL.
default Default cursor (usually an arrow)
auto Default. The cursor set by the browser.
crosshair The cursor appears as a crosshair.
pointer The cursor appears as a pointer (a hand) indicating a link.
move This cursor indicates that an object can be moved.
6. Detailed explanation of the example code of cursor attribute in CSS
cursor attribute of CSS
Today I learned the cursor attribute of CSS. This is my first blog Let's sum it up.
The cursor attribute is used to control the display style of the cursor. The possible values are as follows:
cursor:url()*| {auto|default|pointer|crosshair|text|vertical-text|help|not-allowed|no-drop|move|e-reszie|s-resize|w-resize|w-resize|n-resize|all-scroll|ne-resize|se-resize|nw-resize|sw-resize|col-resize|row-resize|}
* means writing at least one of this value, and you can select a value in {} after the url.
Related questions and answers:
2. vim - Mapping
[Related recommendations 】
1. php.cn Dugu Jiujian (2) - css video tutorial
2. Position the mouse focus to the end of the text box
The above is the detailed content of Summary of CSS-cursor properties and usage. For more information, please follow other related articles on the PHP Chinese website!

Yes,youshouldlearnbothFlexboxandGrid.1)Flexboxisidealforone-dimensional,flexiblelayoutslikenavigationmenus.2)Gridexcelsintwo-dimensional,complexdesignssuchasmagazinelayouts.3)Combiningbothenhanceslayoutflexibilityandresponsiveness,allowingforstructur

What does it look like to refactor your own code? John Rhea picks apart an old CSS animation he wrote and walks through the thought process of optimizing it.

CSSanimationsarenotinherentlyhardbutrequirepracticeandunderstandingofCSSpropertiesandtimingfunctions.1)Startwithsimpleanimationslikescalingabuttononhoverusingkeyframes.2)Useeasingfunctionslikecubic-bezierfornaturaleffects,suchasabounceanimation.3)For

@keyframesispopularduetoitsversatilityandpowerincreatingsmoothCSSanimations.Keytricksinclude:1)Definingsmoothtransitionsbetweenstates,2)Animatingmultiplepropertiessimultaneously,3)Usingvendorprefixesforbrowsercompatibility,4)CombiningwithJavaScriptfo

CSSCountersareusedtomanageautomaticnumberinginwebdesigns.1)Theycanbeusedfortablesofcontents,listitems,andcustomnumbering.2)Advancedusesincludenestednumberingsystems.3)Challengesincludebrowsercompatibilityandperformanceissues.4)Creativeusesinvolvecust

Using scroll shadows, especially for mobile devices, is a subtle bit of UX that Chris has covered before. Geoff covered a newer approach that uses the animation-timeline property. Here’s yet another way.

Let’s run through a quick refresher. Image maps date all the way back to HTML 3.2, where, first, server-side maps and then client-side maps defined clickable regions over an image using map and area elements.

The State of Devs survey is now open to participation, and unlike previous surveys it covers everything except code: career, workplace, but also health, hobbies, and more.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver CS6
Visual web development tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use
