You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无需图片在HTML元素显示.move{cursor:move;}光标,能否应用于<i>元素?

Using the Move Cursor in HTML Without Images & Applying It to Elements

Absolutely, you don’t need any images to display the move cursor—CSS has a built-in value for that! The cursor: move; property directly tells the browser to show the standard move cursor (usually a cross with arrows pointing in all four directions) when the user hovers over the element.

How to implement it:

  • Define a CSS class with the cursor property, then apply it to any HTML element you want. Here’s a quick example:
.move {
  cursor: move;
}
<!-- Applying to a block element -->
<div class="move">Drag this div around!</div>

<!-- Applying to an inline element like <i> -->
<i class="move">Hover over this italic text to see the move cursor</i>

Can you apply this style to elements?

Yes, definitely! The cursor property works on all HTML elements, including inline tags like <i>. The <i> tag is typically used for semantic italic styling, but CSS doesn’t restrict cursor properties based on the element’s type.

If you want every <i> element on your page to have the move cursor, you can target it directly without a class:

i {
  cursor: move;
}

Just note that if the <i> element is empty or has no visible content, the cursor change might not be obvious—so ensure there’s text or a visible element inside it for users to hover over.

内容的提问来源于stack exchange,提问作者user9240263

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:54:03