日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 前端技术 > CSS >内容正文

CSS

CSS一些有趣的东西

發(fā)布時(shí)間:2024/4/15 CSS 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CSS一些有趣的东西 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

w3cschool摘錄,供自己學(xué)習(xí)用。

css cursor屬性

定義和用法

cursor 屬性規(guī)定要顯示的光標(biāo)的類型(形狀)。

實(shí)例

一些不同的光標(biāo):

<html>

<body>
<p>請(qǐng)把鼠標(biāo)移動(dòng)到單詞上,可以看到鼠標(biāo)指針發(fā)生變化:</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:pointer">
Pointer
</span><br />
<span style="cursor:move">
Move
</span><br />
<span style="cursor:e-resize">
e-resize
</span><br />
<span style="cursor:ne-resize">
ne-resize
</span><br />
<span style="cursor:nw-resize">
nw-resize
</span><br />
<span style="cursor:n-resize">
n-resize
</span><br />
<span style="cursor:se-resize">
se-resize
</span><br />
<span style="cursor:sw-resize">
sw-resize
</span><br />
<span style="cursor:s-resize">
s-resize
</span><br />
<span style="cursor:w-resize">
w-resize
</span><br />
<span style="cursor:text">
text
</span><br />
<span style="cursor:wait">
wait
</span><br />
<span style="cursor:help">
help
</span>
</body>

</html>

通過(guò)HTML DOM course屬性也可以實(shí)現(xiàn)這個(gè)效果:

語(yǔ)法:

Object.style.cursor=cursortype

實(shí)例

本例改變指針:

<html>
<head>
<script type="text/javascript">
function changeCursor()
{
document.body.style.cursor
="crosshair";
document.getElementById(
"p1").style.cursor="text";
}
</script>
</head>
<body>

<p id="p1">This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text. This is some text. This is some text.
This is some text.
</p>

<input type="button" onclick="changeCursor()"
value
="Change cursor" />

</body>
</html>

轉(zhuǎn)載于:https://www.cnblogs.com/xinyebabao/archive/2011/06/22/2034932.html

總結(jié)

以上是生活随笔為你收集整理的CSS一些有趣的东西的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。