HTML의 커서
HTML 속성의 커서는 특정 유형의 커서 속성을 사용하여 HTML 요소 위에 마우스를 올려 놓을 때 커서의 모양이나 모양과 느낌을 제어합니다. 이 개념은 커서와 마우스가 있는 모든 장치에만 적용 가능합니다. 그렇지 않은 경우 이 기능은 커서 속성과 관련된 결과를 가져올 수 있습니다. 이 커서 속성의 목적은 모든 양식에 버튼을 제출하기 위해 이미지를 사용하는 것입니다. 최종 사용자가 이미지 위로 마우스를 가져갈 때마다 제출 버튼인 경우 클릭하면 이미지가 버튼으로 작동하고 있다는 단서를 자동으로 제공합니다.
HTML에서 커서 속성은 어떻게 작동하나요?
HTML 커서 속성은 HTML 태그 내의 스타일 속성을 기반으로 작동합니다. HTML의 몇 가지 다른 커서 구문을 조사해 보겠습니다.
구문 #1
<span style="cursor:auto">auto</span>
구문 #2
<span style="cursor:crosshair">crosshair</span>
구문 #3
<span style="cursor:default">default</span>
구문 #4
<span style="cursor:e-resize">e-resize</span>
구문 #5
<span style="cursor:help">help</span>
구문 #6
<span style="cursor:move">move</span>
구문 #7
<span style="cursor:n-resize">n-resize</span>
구문 #8
<span style="cursor:ne-resize">ne-resize</span>
구문 #9
<span style="cursor:nw-resize">nw-resize</span>
구문 #10
<span style="cursor:pointer">pointer</span>
구문 #11
<span style="cursor:progress">progress</span>
구문 #12
<span style="cursor:s-resize">s-resize</span>
구문 #13
<span style="cursor:se-resize">se-resize</span>
구문 #14
<span style="cursor:sw-resize">sw-resize</span>
구문 #15
<span style="cursor:text">text</span>
구문 #16
<span style="cursor:w-resize">w-resize</span>
구문 #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 |
|
Item tidak digugurkan, menunjukkan kursor. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tidak dibenarkan | ![]() |
Permintaan tidak dapat meneruskan tindakan kursor ke hadapan. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rebut | ![]() |
Merebut kursor | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
merampas | ![]() |
Sesuatu sedang ditangkap kursor. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mengubah saiz & Menatal | semua tatal |
![]()
|
|
|
Tatal ke mana-mana arah tertentu menunjukkan kursor.
|
|
![]()
|
|
|
Item/lajur boleh diubah saiz secara mendatar. |
![]()
|
|
|
Item/lajur boleh diubah saiz Menegak. |
![]()
|
|
|
Mana-mana tepi yang dialihkan ke arah tertentu yang ditunjukkan menunjukkan kursor. |
![]()
|
e-saiz semula
|
|
![]()
|
s-ubah saiz
|
|
![]()
|
w-ubah saiz
|
|
![]()
|
ne-resize
|
|
![]()
|
nw-ubah saiz
|
|
![]()
|
saiz semula
|
|
![]()
|
saiz sw
|
|
![]()
|
ubah saiz ew |
| Kursor ubah saiz dua arah. |
![]()
|
ns-ubah saiz
|
|
![]()
|
saiz baru
|
|
![]()
|
nwse-resize
|
|
|
![]()
|
zum masuk |
| Zum masuk dan zum keluar menunjukkan kursor |
![]()
|
|
Examples to Implement Cursor in HTML
Below are the examples mentioned:
Example #1
Links and Status showing cursors.
Code:
<!DOCTYPE html> <html> <head> <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> </head> <body> <div class="div2"> <h3 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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> </html>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #2
Selection showing cursors
Code:
<!DOCTYPE html> <html> <head> <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> </head> <body> <div class="div2"> <h3 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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> </html>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #3
Drag and drop showing cursors.
Code:
<!DOCTYPE html> <html> <head> <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> </head> <body> <div class="div2"> <h3 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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 style="text-align: center">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> </html>
Output:
Explanation: In the above output, click any paragraph for seeing the corresponding cursor output.
Example #4
Selection showing cursors.
Code:
<!DOCTYPE html> <html> <head> <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> </head> <body> <div class="div2"> <h3 style="text-align: center">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 style="text-align: center">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> </html>
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.
위 내용은 HTML의 커서의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











HTML의 테이블 테두리 안내. 여기에서는 HTML의 테이블 테두리 예제를 사용하여 테이블 테두리를 정의하는 여러 가지 방법을 논의합니다.

HTML 여백-왼쪽 안내. 여기에서는 HTML margin-left에 대한 간략한 개요와 코드 구현과 함께 예제를 논의합니다.

HTML의 Nested Table에 대한 안내입니다. 여기에서는 각 예와 함께 테이블 내에 테이블을 만드는 방법을 설명합니다.

HTML 테이블 레이아웃 안내. 여기에서는 HTML 테이블 레이아웃의 값에 대해 예제 및 출력 n 세부 사항과 함께 논의합니다.

HTML 입력 자리 표시자 안내. 여기서는 코드 및 출력과 함께 HTML 입력 자리 표시자의 예를 논의합니다.

HTML 순서 목록에 대한 안내입니다. 여기서는 HTML Ordered 목록 및 유형에 대한 소개와 각각의 예에 대해서도 설명합니다.

HTML에서 텍스트 이동 안내. 여기서는 Marquee 태그가 구문과 함께 작동하는 방식과 구현할 예제에 대해 소개합니다.

HTML onclick 버튼에 대한 안내입니다. 여기에서는 각각의 소개, 작업, 예제 및 다양한 이벤트의 onclick 이벤트에 대해 설명합니다.
