Html 当我将鼠标悬停在表格中的文本上时,如何阻止光标变为 I 栏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20988458/
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 00:23:50  来源:igfitidea点击:

How can I stop my cursor changing to an I bar when I hover over text in a table?

htmlcss

提问by

I have an HTML table and I put a double click on the rows. The table is read only except for some <input>fields.

我有一个 HTML 表格,我双击行。除了某些<input>字段外,该表是只读的。

How can I make it so that the cursor does not change to an I bar when I hover over the text that's not an <input>field?

当我将鼠标悬停在不是<input>字段的文本上时,如何才能使光标不会变为 I 栏?

I received some answers but they just point to links. Can someone give me an example in a fiddle ?

我收到了一些答案,但它们只是指向链接。有人可以给我一个小提琴的例子吗?

采纳答案by MitulP91

You can use a CSS property called cursorto specify what your cursor will turn into when you scroll over the text. You can see some of the examples here.

你可以使用一个 CSS 属性cursor来指定当你滚动文本时你的光标会变成什么。您可以在此处查看一些示例。

And here is a default cursor on a table example. FIDDLE.

这是表示例上的默认光标。小提琴

回答by faisalbhagat

set cursor property for the field you want to be some thing like pointer,waiting etc

为您想要的字段设置光标属性,例如指针、等待等

http://www.w3schools.com/cssref/pr_class_cursor.asp

http://www.w3schools.com/cssref/pr_class_cursor.asp

回答by uihelp

use this css:

使用这个CSS:

table.className td input{
   cursor: none; /* or the one which you would like to have */
}