## cursor 屬性
### 屬性定義及使用說明
cursor屬性定義了鼠標指針放在一個元素邊界范圍內時所用的光標形狀
JavaScript 語法:object.style.cursor="crosshair"
* * *
## 屬性值
| 值 | 描述 |
| --- | --- |
| *url* | 需使用的自定義光標的 URL。注釋:請在此列表的末端始終定義一種普通的光標,以防沒有由 URL 定義的可用光標。 |
| default | 默認光標(通常是一個箭頭) |
| auto | 默認。瀏覽器設置的光標。 |
| crosshair | 光標呈現為十字線。 |
| pointer | 光標呈現為指示鏈接的指針(一只手) |
| move | 此光標指示某對象可被移動。 |
| e-resize | 此光標指示矩形框的邊緣可被向右(東)移動。 |
| ne-resize | 此光標指示矩形框的邊緣可被向上及向右移動(北/東)。 |
| nw-resize | 此光標指示矩形框的邊緣可被向上及向左移動(北/西)。 |
| n-resize | 此光標指示矩形框的邊緣可被向上(北)移動。 |
| se-resize | 此光標指示矩形框的邊緣可被向下及向右移動(南/東)。 |
| sw-resize | 此光標指示矩形框的邊緣可被向下及向左移動(南/西)。 |
| s-resize | 此光標指示矩形框的邊緣可被向下移動(北/西)。 |
| w-resize | 此光標指示矩形框的邊緣可被向左移動(西)。 |
| text | 此光標指示文本。 |
| wait | 此光標指示程序正忙(通常是一只表或沙漏)。 |
| help | 此光標指示可用的幫助(通常是一個問號或一個氣球)。 |
## 實例--一些不同的光標:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool教程(w3cschool.cn)</title>
</head>
<body>
<p>將鼠標移動到這些字上改變鼠標樣式cursor.</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br>
</body>
</html>
```
- CSS常用樣式控制
- background--背景
- Text--文本
- CSS屬性
- align-*
- animation-*
- appearance
- backface-visibility
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-image
- background-origin
- background-position
- background-repeat
- background-size
- border
- border-bottom
- border-bottom-color
- border-bottom-left-radius
- border-bottom-right-radius
- border-bottom-style
- border-bottom-width
- border-collapse
- border-color
- border-image
- border-image-outset
- border-image-repeat
- border-image-source
- border-image-width
- Border-left
- border-left-color
- border-left-style
- border-left-width
- border-image-slice
- border-radius
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-spacing
- border-style
- border-top
- border-top-color
- border-top-left-radius
- border-top-right-radius
- border-top-style
- border-top-width
- border-width
- bottom
- box-shadow
- box-sizing
- caption-side
- clear
- clip
- color
- column-count
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
- content
- counter-increment
- counter-reset
- cursor
- direction
- display
- Empty-cells
- filter(濾鏡)
- CSS 偽元素選擇器
- :active 選擇器
- :after 選擇器
- :before 選擇器
- :checked 選擇器
- :disabled 選擇器
- :empty 選擇器
- :enabled 選擇器
- :first-child 偽元素
- :first-letter 偽元素
- :first-line 偽元素
- :first-of-type 選擇器
- :focus 選擇器
- :hover 選擇器