日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频

中國最全IT社區(qū)平臺 聯(lián)系我們 | 收藏本站
阿里云優(yōu)惠2

css教程

CSS 教程

CSS 響應式設(shè)計

CSS實例

拓展閱讀

css鼠標樣式語法及20種可選值(屬性)

閱讀 (2343)

我們對Windows各種各樣的鼠標樣式都不陌生,當鼠標移動到不同的地方時,當鼠標執(zhí)行不同的功能時,當系統(tǒng)處于不同的狀態(tài)時,都會使鼠標的形狀發(fā)生變化。而在網(wǎng)頁上往往只有當鼠標在超級鏈接上時才出現(xiàn)一個手形,在其它地方似乎沒有什么變化,同充滿動感的網(wǎng)頁顯得不怎么和諧。這里教大家用CSS來定義20種種鼠標樣式形狀。在CSS中,使用cursor屬性來定義鼠標的樣式。


用css控制鼠標樣式的語法如下:

<span style="cursor:*">文本或其它頁面元素</span>

把 * 換成如下20個可選值的一種:

cursor屬性取值如下,默認值為default。大家可能會說,cursor屬性值這么多,怎么記呀?其實大家不用擔心,在實際開發(fā)中,我們一般只用到“default”和“pointer”這兩個屬性值,其他的一般都很少用得上。如果實在沒辦法還需要其他的,那就回來查這種表就行了。

crosshair;


十字準心

The cursor render as a crosshair
游標表現(xiàn)為十字準線

cursor: pointer; 
cursor: hand;
寫兩個是為了照顧IE5,它只認hand。

 

The cursor render as a pointer (a hand) that indicates a link
游標以暗示(手指)的形式來表明有一個連接

cursor: wait;

 

等待/沙漏

The cursor indicates that the program is busy (often a watch or an hourglass)
游標暗示當前程序正忙(一般為一塊表或是一個沙漏)

cursor: help;

 

幫助

The cursor indicates that help is available (often a question mark or a balloon)
游標暗示當前位置可得到幫助(一般為問號或是氣球)

cursor: no-drop;

 

無法釋放

cursor: no-drop;

cursor: text;

 

文字/編輯

The cursor indicates text
游標暗示當前所處位置為文字內(nèi)容

cursor: move;

 

可移動對象

The cursor indicates something that should be moved
游標暗示一些東西應該被移動

cursor: n-resize;

 

向上改變大小(North)

The cursor indicates that an edge of a box is to be moved up (north)
邊緣可向上移動(北)

cursor: s-resize;

 

向下改變大小(South)

The cursor indicates that an edge of a box is to be moved down (south)
邊緣可向下方移動(南)

cursor: e-resize;

 

向右改變大小(East)

The cursor indicates that an edge of a box is to be moved right (east)
box邊緣可向右(東)邊移動

cursor: w-resize;

向左改變大小(West)

The cursor indicates that an edge of a box is to be moved left (west)
邊緣可向左移動(西)

cursor: ne-resize;

 

向上右改變大小(North East)

The cursor indicates that an edge of a box is to be moved up and right (north/east)
游標暗示box的邊緣可向右上方移動(東北方向)

cursor: nw-resize;

 

向上左改變大小(North West)

The cursor indicates that an edge of a box is to be moved up and left (north/west)
邊緣可向左上方移動(西北)

cursor: se-resize;

 

向下右改變大小(South East)

The cursor indicates that an edge of a box is to be moved down and right (south/east)
邊緣可向右下方移動(東南)

cursor: sw-resize;

 

向下左改變大小(South West)

The cursor indicates that an edge of a box is to be moved down and left (south/west)
邊緣可向左下方移動(西南)

cursor: auto;

 

自動

The browser sets a cursor
瀏覽器設(shè)置一個游標

cursor:not-allowed;

 

禁止

cursor:not-allowed;

cursor: progress;

 

處理中

cursor: progress;

cursor: default;

 

系統(tǒng)默認

The default cursor (often an arrow)
默認的游標狀態(tài)(通常為一個箭頭)

cursor: url(' # ');
# = 光標文件地址      (注意文件格式必須為:.cur 或 .ani)。

 

用戶自定義(可用動畫)

The url of a custom cursor to be used.
自定義游標的url位置

Note: Always define a generic cursor at the end of the list in case none of the url-defined cursors can be used
注意:在定義完自定義的游標之后在末尾加上一般性的游標,以防那些url所定義的游標不能使用


cursor的pointer與hand區(qū)別

cursor:hand 與 cursor:pointer 的效果是一樣,都像手形光標。那為什么有兩個呢,這兩個有什么區(qū)別呢?

用瀏覽器測試得出以下結(jié)論:
cursor:hand :IE完全支持。但是在firefox是不支持的,沒有效果。
cursor:pointer :是CSS2.0的標準。所以firefox是支持的,但是IE5.0既之前版本不支持。IE6開始支持。
所以為了兼容各個主流瀏覽器,盡量使用cursor:pointer,而不要使用cursor:hand。

實例:

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>cursor屬性</title>
    <style type="text/css">
        div
        {
            width:100px;
            height:30px;
            line-height:30px;
            text-align:center;
            border:1px solid #CCCCCC;
            background-color: #40B20F;
            color:white;
            font-size:14px;
            font-weight:bold;
        }
        #div_default{cursor:default;}
        #div_pointer{cursor:pointer;}
    </style>
</head>
<body>
    <div id="div_default">鼠標默認樣式</div>
    <div id="div_pointer">鼠標手狀樣式</div>
</body>
</html>
在瀏覽器預覽效果如下:

css鼠標樣式

CSS Cursor鼠標指針樣式兼容性參考表

下面分享一個鼠標指針樣式兼容性在線參考表,黑色圖標:表示該屬性兼容此瀏覽器。灰色圖標:表示該屬性不兼容此瀏覽器。

CSS Cursor兼容表




關(guān)閉
程序員人生
主站蜘蛛池模板: 成人久久av | 亚洲欧美视频一区 | 日韩精品视频中文字幕 | 国产精品一二三四区 | 亚洲成人av免费在线观看 | 亚洲成人精品一区二区三区 | 精品久久久噜噜噜久久x99a | 国产伊人网 | 欧美三级电影 | 亚洲一区二区三区在线播放 | 国产日韩在线视频 | 久久伊人国产视频 | 国产精品18久久久 | 黄色毛片在线视频 | 国产高清自拍视频 | 精品国产一区av | 黑人巨大精品欧美一区免费视频 | 一区二区三区在线播放 | 91精品国产91综合久久蜜臀 | 91精品国产综合久久福利 | 欧美成人精品一区二区三区在线看 | 亚洲色图综合网 | 99麻豆久久久国产精品免费 | 天堂av免费观看 | 欧美一a一片一级一片 | 精品在线一区二区 | 久久久久国产精品一区二区 | 国产一级免费 | 国产麻豆乱码精品一区二区三区 | 欧美第一区 | av中文字幕在线播放 | 看全色黄大色黄大片男爽一次 | 欧美日韩亚洲成人 | 亚洲熟区 | 国产精品久久久久久久久久久久久 | 日韩精品一区在线观看 | 亚洲一区在线免费 | 99精品视频在线观看免费 | 国产精品一区二区三区免费视频 | 一个色av | 成人一区视频 |