検索
HTMLのカーソルSep 04, 2024 pm 04:53 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

HTML プロパティのカーソルは、特定の種類のカーソル プロパティを使用して、HTML 要素上にカーソルを置いたときのカーソルの形状や外観を制御します。この概念は、カーソルとマウスを備えたデバイスにのみ適用されます。そうでない場合、この機能はカーソル プロパティを使用して関連する結果を返す可能性があります。このカーソル プロパティの目的は、フォーム上でボタンを送信するために画像を使用することです。エンドユーザーが画像の上にマウスを移動すると、それが送信ボタンの場合は、クリックすることで画像がボタンとして機能していることが自動的にわかります。

HTML では Cursor プロパティはどのように機能しますか?

HTML カーソル プロパティは、HTML タグ内の style プロパティに基づいて機能します。 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

열 크기 조정행 크기 조정n-크기 조정
Type HTML Value How Cursor Look Like? Description
General auto Based on the text cursor will change automatically.
default HTMLのカーソル By default, an arrow cursor.
none No cursor is displayed.
Links & Status context-menu HTMLのカーソル Cursor like context menu
help HTMLのカーソル Help information with an arrow question mark.
pointer HTMLのカーソル Pointer symbol with a hand like a cursor.
progress HTMLのカーソル Says program is busy and can able to interact with the application.
wait HTMLのカーソル Says program is busy and cannot able to interact with the application.
Selection cell HTMLのカーソル Cells can be selected from the table showing the cursor.
crosshair HTMLのカーソル Cross cursor used for selection.
text HTMLのカーソル An I-beam cursor used for the selected text.
vertical-text HTMLのカーソル A sideway I-beam cursor used for the vertical selected text.
Drag & Drop alias HTMLのカーソル shortcut cursor
copy HTMLのカーソル Copied cursor
move HTMLのカーソル the element can be moved with the cursor.
no-drop
HTMLのカーソル
항목이 삭제되지 않고 커서가 표시됩니다.
불가 HTMLのカーソル 요청은 커서 작업을 앞으로 진행할 수 없습니다.
잡기 HTMLのカーソル 잡은 커서
잡기 HTMLのカーソル 뭔가 커서를 움켜쥐고 있습니다.
크기 조정 및 스크롤 전체 스크롤
HTMLのカーソル
HTMLのカーソル
특정 방향으로 스크롤하면 커서가 표시됩니다. HTMLのカーソル
항목/열의 크기를 가로로 조정할 수 있습니다.HTMLのカーソル
항목/열의 크기를 세로로 조정할 수 있습니다.HTMLのカーソル
커서를 표시하는 특정 표시된 방향으로 이동한 모든 가장자리.HTMLのカーソル
전자 크기 조정 HTMLのカーソル
크기 조정 HTMLのカーソル
w-크기 조정 HTMLのカーソル
크기 조정 HTMLのカーソル
nw-크기 조정 HTMLのカーソル
크기 조정 HTMLのカーソル
sw-크기 조정 HTMLのカーソル 새 크기 조정
양방향 크기 조정 커서.HTMLのカーソル
ns-크기 조정 HTMLのカーソル
새 크기 조정 HTMLのカーソル
nwse-크기 조정 HTMLのカーソル확대/축소 확대
커서가 보이는 확대 및 축소HTMLのカーソル
축소

 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:

HTMLのカーソル

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:

HTMLのカーソル

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:

HTMLのカーソル

HTMLのカーソル

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:

HTMLのカーソル

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 中国語 Web サイトの他の関連記事を参照してください。

声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
HTML超文本标记语言--超在那里?(文档分析)HTML超文本标记语言--超在那里?(文档分析)Aug 02, 2022 pm 06:04 PM

本篇文章带大家了解一下HTML(超文本标记语言),介绍一下HTML的本质,HTML文档的结构、HTML文档的基本标签和图像标签、列表、表格标签、媒体元素、表单,希望对大家有所帮助!

html和css算编程语言吗html和css算编程语言吗Sep 21, 2022 pm 04:09 PM

不算。html是一种用来告知浏览器如何组织页面的标记语言,而CSS是一种用来表现HTML或XML等文件样式的样式设计语言;html和css不具备很强的逻辑性和流程控制功能,缺乏灵活性,且html和css不能按照人类的设计对一件工作进行重复的循环,直至得到让人类满意的答案。

web前端笔试题库之HTML篇web前端笔试题库之HTML篇Apr 21, 2022 am 11:56 AM

总结了一些web前端面试(笔试)题分享给大家,本篇文章就先给大家分享HTML部分的笔试题(附答案),大家可以自己做做,看看能答对几个!

总结HTML中a标签的使用方法及跳转方式总结HTML中a标签的使用方法及跳转方式Aug 05, 2022 am 09:18 AM

本文给大家总结介绍a标签使用方法和跳转方式,希望对大家有所帮助!

HTML5中画布标签是什么HTML5中画布标签是什么May 18, 2022 pm 04:55 PM

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

html中document是什么html中document是什么Jun 17, 2022 pm 04:18 PM

在html中,document是文档对象的意思,代表浏览器窗口的文档;document对象是window对象的子对象,所以可通过“window.document”属性对其进行访问,每个载入浏览器的HTML文档都会成为Document对象。

html5废弃了哪个列表标签html5废弃了哪个列表标签Jun 01, 2022 pm 06:32 PM

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

Html5怎么取消td边框Html5怎么取消td边框May 18, 2022 pm 06:57 PM

3种取消方法:1、给td元素添加“border:none”无边框样式即可,语法“td{border:none}”。2、给td元素添加“border:0”样式,语法“td{border:0;}”,将td边框的宽度设置为0即可。3、给td元素添加“border:transparent”样式,语法“td{border:transparent;}”,将td边框的颜色设置为透明即可。

See all articles

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

SecLists

SecLists

SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。

EditPlus 中国語クラック版

EditPlus 中国語クラック版

サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Eclipse を SAP NetWeaver アプリケーション サーバーと統合します。

AtomエディタMac版ダウンロード

AtomエディタMac版ダウンロード

最も人気のあるオープンソースエディター

PhpStorm Mac バージョン

PhpStorm Mac バージョン

最新(2018.2.1)のプロフェッショナル向けPHP統合開発ツール