【问题标题】:IE strange behavior on textarea and select?IE 在 textarea 和选择上的奇怪行为?
【发布时间】:2014-10-07 19:41:41
【问题描述】:

我在光标属性 css 上有奇怪的 IE 行为?

这是代码,这只是简单的内联样式来显示问题所在?

<div style="width:100%;">
<select>
<option value="">Select</option>
<option>John</option>
<option>John</option>
<option>John</option>
<option>John</option>
<option>John</option>
<option>John</option>
</select>
</div>
<textarea style="cursor:not-allowed;"></textarea>

All i working OK in Firefox and Google Chrome, only in IE is the problem, when option get over textarea cursor change style to not allowed?请在此处查看 fiddle 但仅在 IE 中?

工作小提琴

http://jsfiddle.net/f6paL8sc/

【问题讨论】:

标签: css html internet-explorer styles


【解决方案1】:

这似乎是一个与 IE 相关的错误。我已经制定了一个解决方案,它可以工作 *(*IE 需要一个 .cur 文件才能工作);但让我们先检查 DEMO

在此示例中,我使用disabled 属性禁用了textarea,因为您使用的是cursor:not-allowed,它给人的印象是该字段是disabled

下载此 PNG 图片并使用此 Online tool 将其转换为 (.cur)

这是使用的 CSS。

textarea[disabled]
{
 display:block;
  cursor:url('http://www.dolliehost.com/dolliecrave/cursors/cursors-cute/cute25.gif'), url('cute25.cur'), wait;
  background:gold;
}

在 HTML 代码中,我禁用了 textarea,这在这里更有意义。

<textarea disabled>This TextArea is disabled</textarea>

注意:我没有机会在 IE 上进行测试,但它必须有效。

【讨论】:

  • 您制作了.cur 文件吗?要在 IE 中工作,您需要此扩展。我确信它适用于所有版本的 IE。
猜你喜欢
  • 1970-01-01
  • 2018-07-06
  • 2010-10-08
  • 1970-01-01
  • 1970-01-01
  • 2014-01-26
  • 2013-01-29
  • 2014-05-28
  • 1970-01-01
相关资源
最近更新 更多