Html 如何将鼠标指针箭头转换为手上的鼠标悬停链接或按钮。?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14179669/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 04:46:07  来源:igfitidea点击:

how to convert mouse pointer arrow to hand onmouseover link or button.?

htmlcss

提问by user1936888

Possible Duplicate:
Make mouse pointer a hand when hover over <li> element?

可能的重复:
将鼠标指针悬停在 <li> 元素上时使鼠标指针成为一只手?

i want to convert a mouse pointer(arrow) into a hand (with finger) on over any link or button. I have seen many posts here on this site. but they all are either in asp.net or in other language. As i want to make this to happen only in javascript or css or php or combinations of these languages these posts was not helpful to me in any way. so Please help...

我想在任何链接或按钮上将鼠标指针(箭头)转换为手(用手指)。我在这个网站上看到了很多帖子。但它们都在asp.net 或其他语言中。因为我想让这仅在 javascript 或 css 或 php 或这些语言的组合中发生,所以这些帖子对我没有任何帮助。所以请帮助...

回答by Visal Chhourm

try this one a:hover,button:hover { cursor: pointer;}

试试这个 a:hover,button:hover { cursor: pointer;}

waiting for good news

等待好消息

回答by Anujith

Use CSS:

使用 CSS:

a, button, input[type="submit"] {
    cursor: pointer;
}

But IE6doesnot support CSS selectors..(input[type="submit"])

但是IE6不支持 CSS 选择器..( input[type="submit"])

You might find How to workaround: IE6 does not support CSS “attribute” selectorsworth the read.

您可能会发现如何解决:IE6 不支持值得一读的CSS“属性”选择器

回答by MikeM

anchor elements by default use a hand pointer.

锚元素默认使用手形指针。

CSS for buttons to also use a hand pointer:

按钮的 CSS 也使用手形指针:

button, 
input[type=submit], 
input[type=reset] {cursor:pointer;}

demo

演示

回答by Raghvendra Parashar

To use with force full cursor pointer

与强制完整光标指针一起使用

a,
button {
  cursor: pointer !important;
}