css设置光标为拖动

 时间:2026-04-23 04:08:38

1、打开html前端开发软件,创建一个html页面,然后在这个页面上创建<div>添加class类,同时输入一些文字。

代码:<div class="move">鼠标放上,鼠标指针变为可拖动</div>

css设置光标为拖动

2、设置cursor: move。创建<style>标签,然后对move类添加cursor: move属性。如图:

代码:

<style type="text/css">

.move{

cursor: move;

}

</style>

css设置光标为拖动

3、保存html页面后使用浏览器打开,鼠标移动到<div>上即可看到效果。

页面所有代码:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title></title>

<style type="text/css">

.move{

cursor: move;

}

</style>

</head>

<body>

<div class="move">鼠标放上,鼠标指针变为可拖动</div>

</body>

</html>

  • 如何在windows2003系统内分区
  • 如何将select查询结果,插入临时表或者物理表?
  • linux操作系统教程:[11]linux怎么禁用用户
  • Windows server 2008域用户不能更改密码
  • 易语言写注册表
  • 热门搜索
    如何去除黑头 起亚车质量怎么样 月经期间如何减肥 海地在哪里 内蒙古旅游路线 恩施旅游地图 脚指甲变厚怎么解决 呼和浩特 旅游 潮汕站在哪里 罪恶都市怎么赚钱