Cursor in HTML property controls the shape or look and feel of the cursor when it is hovering on any HTML element by using a specific type of cursor property. This concept is applicable only for whatever devices have a cursor and mouse; if not, this feature could any relevant results with cursor property. The purpose of this cursor property is in using images for submitting buttons on any forms. Whenever an end-user hovers over an image, then if that is a submit button, automatically it gives you a clue that the image is working as a button by clicking it.
How does Cursor Property work in HTML?
HTML cursor property works based on style property within HTML tag. We will investigate some different cursor syntax in HTML.
Syntax #1
<span style="cursor:auto">auto</span>
Syntax #2
<span style="cursor:crosshair">crosshair</span>
Syntax #3
<span style="cursor:default">default</span>
Syntax #4
<span style="cursor:e-resize">e-resize</span>
Syntax #5
<span style="cursor:help">help</span>
Syntax #6
<span style="cursor:move">move</span>
Syntax #7
<span style="cursor:n-resize">n-resize</span>
Syntax #8
<span style="cursor:ne-resize">ne-resize</span>
Syntax #9
<span style="cursor:nw-resize">nw-resize</span>
Syntax #10
<span style="cursor:pointer">pointer</span>
Syntax #11
<span style="cursor:progress">progress</span>
Syntax #12
<span style="cursor:s-resize">s-resize</span>
Syntax #13
<span style="cursor:se-resize">se-resize</span>
Syntax #14
<span style="cursor:sw-resize">sw-resize</span>
Syntax #15
<span style="cursor:text">text</span>
Syntax #16
<span style="cursor:w-resize">w-resize</span>
Syntax #17
<span style="cursor:wait">wait</span>
Cursor Values and its Description Table
Type | HTML Value | How Cursor Look Like? | Description | |||||
General | auto | Based on the text cursor will change automatically. | ||||||
default | ![]() |
By default, an arrow cursor. | ||||||
none | No cursor is displayed. | |||||||
Links & Status | context-menu | ![]() |
Cursor like context menu | |||||
help | ![]() |
Help information with an arrow question mark. | ||||||
pointer | ![]() |
Pointer symbol with a hand like a cursor. | ||||||
progress | ![]() |
Says program is busy and can able to interact with the application. | ||||||
wait | ![]() |
Says program is busy and cannot able to interact with the application. | ||||||
Selection | cell | ![]() |
Cells can be selected from the table showing the cursor. | |||||
crosshair | ![]() |
Cross cursor used for selection. | ||||||
text | ![]() |
An I-beam cursor used for the selected text. | ||||||
vertical-text | ![]() |
A sideway I-beam cursor used for the vertical selected text. | ||||||
Drag & Drop | alias | ![]() |
shortcut cursor | |||||
copy | ![]() |
Copied cursor | ||||||
move | ![]() |
the element can be moved with the cursor. | ||||||
no-drop |
|
項目未掉落,顯示遊標。 | ||||||
不允許 | ![]() |
請求無法繼續遊標操作。 | ||||||
抓住 | ![]() |
抓住遊標 | ||||||
抓 | ![]() |
有東西被抓住遊標。 | ||||||
調整大小和滾動 | 全滾動 |
|
![]() |
|||||
在顯示遊標的任何特定方向上捲動。 |
![]() |
|||||||
項目/列可以水平調整大小。 ![]() |
||||||||
項目/列可以垂直調整大小。 ![]() |
||||||||
在顯示遊標的特定顯示方向上移動的任何邊緣。 ![]() |
||||||||
電子調整大小 |
![]() |
|||||||
s-調整大小 |
![]() |
|||||||
w-調整大小 |
![]() |
|||||||
重新調整大小 |
![]() |
|||||||
西北調整大小 |
![]() |
|||||||
自動調整大小 |
![]() |
|||||||
sw-調整大小 |
![]() |
調整大小 | ||||||
雙向調整遊標大小。 ![]() |
||||||||
ns-調整大小 |
![]() |
|||||||
新調整大小 |
![]() |
|||||||
nwse-調整大小 |
![]() |
放大 | ||||||
放大縮小顯示遊標![]() |
Examples to Implement Cursor in HTML
Below are the examples mentioned:
Example #1
Links and Status showing cursors.
Code:
<meta charset="ISO-8859-1"> <title>Cursors in HTML</title> <style type="text/css"> .div2 { border: 1px solid brown; color: green; width: 900px; font-size: 20px; } .div3 { border: 1px solid brown; color: red; width: 900px; font-size: 20px; } .div4 { border: 1px solid brown; color: blue; width: 900px; font-size: 20px; } .div5 { border: 1px solid brown; color: lime; width: 900px; font-size: 20px; } </style> <div class="div2"> <h3 id="Progress-Cursor-Demo">Progress Cursor Demo</h3> <span style="cursor: progress">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div3"> <h3 id="Help-Cursor-Demo">Help Cursor Demo</h3> <span style="cursor: help">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div4"> <h3 id="Pointer-Cursor-Demo">Pointer Cursor Demo</h3> <span style="cursor: pointer">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div5"> <h3 id="Wait-Cursor-Demo">Wait Cursor Demo</h3> <span style="cursor: wait">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #2
Selection showing cursors
Code:
<meta charset="ISO-8859-1"> <title>Cursors in HTML</title> <style type="text/css"> .div2 { border: 1px solid blue; color: fuchsia; width: 900px; font-size: 20px; } .div3 { border: 1px solid blue; color: gray; width: 900px; font-size: 20px; } .div4 { border: 1px solid blue; color: maroon; width: 900px; font-size: 20px; } </style> <div class="div2"> <h3 id="Cross-hair-Cursor-Demo">Cross hair Cursor Demo</h3> <span style="cursor: crosshair">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div3"> <h3 id="Horizontal-Text-Cursor-Demo">Horizontal Text Cursor Demo</h3> <span style="cursor: text">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div4"> <h3 id="Vertical-Text-Cursor-Demo">Vertical Text Cursor Demo</h3> <span style="cursor: vertical-text">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #3
Drag and drop showing cursors.
Code:
<meta charset="ISO-8859-1"> <title>Cursors in HTML</title> <style type="text/css"> .div2 { border: 1px solid red; color: orange; width: 900px; font-size: 20px; } .div3 { border: 1px solid red; color: olive; width: 900px; font-size: 20px; } .div4 { border: 1px solid red; color: navy; width: 900px; font-size: 20px; } .div5 { border: 1px solid red; color: lime; width: 900px; font-size: 20px; } .div6 { border: 1px solid red; color: blue; width: 900px; font-size: 20px; } .div7 { border: 1px solid red; color: maroon; width: 900px; font-size: 20px; } </style> <div class="div2"> <h3 id="Alias-Cursor-Demo">Alias Cursor Demo</h3> <span style="cursor: alias">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div3"> <h3 id="Copy-Cursor-Demo">Copy Cursor Demo</h3> <span style="cursor: copy">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div4"> <h3 id="Move-Cursor-Demo">Move Cursor Demo</h3> <span style="cursor: move">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div5"> <h3 id="No-drop-Cursor-Demo">No-drop Cursor Demo</h3> <span style="cursor: no-drop">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div6"> <h3 id="Grab-Cursor-Demo">Grab Cursor Demo</h3> <span style="cursor: grab">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div7"> <h3 id="Not-allowed-Cursor-Demo">Not-allowed Cursor Demo</h3> <span style="cursor: not-allowed">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #4
Selection showing cursors.
Code:
<meta charset="ISO-8859-1"> <title>Cursors in HTML</title> <style type="text/css"> .div2 { border: 1px solid fuchsia; color: teal; width: 900px; font-size: 20px; } .div3 { border: 1px solid fuchsia; color: purple; width: 900px; font-size: 20px; } </style> <div class="div2"> <h3 id="Zoom-in-Cursor-Demo">Zoom-in Cursor Demo</h3> <span style="cursor: zoom-in">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div> <br> <div class="div3"> <h3 id="Zoom-out-Cursor-Demo">Zoom-out Cursor Demo</h3> <span style="cursor: zoom-out">Cursor in HTML property controls shape or look and feel of the cursor when it is hovering on the any HTML element by using specific type of cursor property.</span> </div>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Conclusion
Cursor property works based on property value given to the cursor. Based on the requirement, we choose which cursor action required at the instant.
Das obige ist der detaillierte Inhalt vonCursor in HTML. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Die Zukunft von HTML ist voller unendlicher Möglichkeiten. 1) Neue Funktionen und Standards umfassen mehr semantische Tags und die Beliebtheit von Webcomponenten. 2) Der Webdesign -Trend entwickelt sich weiterhin für reaktionsschnelles und zugängliches Design. 3) Die Leistungsoptimierung verbessert die Benutzererfahrung durch reaktionsschnelle Bildlade- und faulen Ladetechnologien.

Die Rollen von HTML, CSS und JavaScript in der Webentwicklung sind: HTML ist für die Inhaltsstruktur verantwortlich, CSS ist für den Stil verantwortlich und JavaScript ist für dynamisches Verhalten verantwortlich. 1. HTML definiert die Webseitenstruktur und den Inhalt durch Tags, um die Semantik zu gewährleisten. 2. CSS steuert den Webseitenstil über Selektoren und Attribute, um es schön und einfach zu lesen. 3. JavaScript steuert das Verhalten von Webseiten über Skripte, um dynamische und interaktive Funktionen zu erzielen.

HtmlisnotaprogrammingLanguage; itiSamarkuplanguage.1) htmlstructuresandFormatswebcontentuses.2) itWorkswithCSSForstylingandjavaScriptForinteraktivität, EnhancingWebDevelopment.

HTML ist der Eckpfeiler der Erstellung von Webseitenstruktur. 1. HTML definiert die Inhaltsstruktur und die Semantik und Verwendung usw. Tags. 2. Stellen Sie semantische Marker wie usw. zur Verfügung, um den SEO -Effekt zu verbessern. 3. Um die Benutzerinteraktion durch Tags zu verwirklichen, achten Sie auf die Verifizierung der Form. 4. Verwenden Sie fortschrittliche Elemente wie in Kombination mit JavaScript, um dynamische Effekte zu erzielen. 5. Zu den häufigen Fehlern gehören nicht abgegebene Bezeichnungen und nicht geeignete Attributwerte, und Überprüfungstools sind erforderlich. 6. Optimierungsstrategien umfassen das Reduzieren von HTTP -Anforderungen, die Komprimierung von HTML, die Verwendung semantischer Tags usw.

HTML ist eine Sprache, mit der Webseiten erstellt, die Webseitenstruktur und -inhalt über Tags und Attribute definiert werden. 1) HTML organisiert die Dokumentstruktur über Tags, wie z. B.. 2) Der Browser analysiert HTML, um das DOM zu erstellen und die Webseite zu rendern. 3) Neue Merkmale von HTML5, wie z. B. Multimedia -Funktionen. 4) Zu den häufigen Fehlern gehören nicht abgestimmte Bezeichnungen und nicht geeignete Attributwerte. 5) Die Optimierungsvorschläge umfassen die Verwendung semantischer Tags und die Reduzierung der Dateigröße.

WebdevelopmentRelieSonHtml, CSS und JavaScript: 1) HtmlStructuresContent, 2) CSSstylesit und 3) JavaScriptaddssinteraktivität, Bildung von TheBasisofModerernwebexperiences.

Die Rolle von HTML besteht darin, die Struktur und den Inhalt einer Webseite durch Tags und Attribute zu definieren. 1. HTML organisiert Inhalte über Tags wie das Lesen und Verständnis. 2. Verwenden Sie semantische Tags wie usw., um die Zugänglichkeit und SEO zu verbessern. 3. Optimierung des HTML -Codes kann die Ladegeschwindigkeit und die Benutzererfahrung der Webseite verbessern.

HtmlisaspecifictypeofcodeFocusedonstructuringuringwebcontent, während "Code" breitincludesluages -ähnlichjavaScriptandpythonforfunctionality.1) htmldefineswebpageStructureStags.2) "Code" cometesaWiNrangeOfLanguagesForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForForfirsInsForfunctionNacts


Heiße KI -Werkzeuge

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool
Ausziehbilder kostenlos

Clothoff.io
KI-Kleiderentferner

AI Hentai Generator
Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

Heiße Werkzeuge

SAP NetWeaver Server-Adapter für Eclipse
Integrieren Sie Eclipse mit dem SAP NetWeaver-Anwendungsserver.

Sicherer Prüfungsbrowser
Safe Exam Browser ist eine sichere Browserumgebung für die sichere Teilnahme an Online-Prüfungen. Diese Software verwandelt jeden Computer in einen sicheren Arbeitsplatz. Es kontrolliert den Zugriff auf alle Dienstprogramme und verhindert, dass Schüler nicht autorisierte Ressourcen nutzen.

Herunterladen der Mac-Version des Atom-Editors
Der beliebteste Open-Source-Editor

Dreamweaver CS6
Visuelle Webentwicklungstools

Dreamweaver Mac
Visuelle Webentwicklungstools