css设置光标为拖动

 时间:2026-02-11 21:03:05

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域用户不能更改密码
  • 易语言写注册表
  • 热门搜索
    大理丽江香格里拉旅游攻略 海口三亚旅游攻略 旅游网站设计模板 常熟旅游网园林卡充值 澳大利亚墨尔本旅游 辽宁兴城旅游 8月适合去哪里旅游 北京冬季旅游攻略 福州有哪些旅游景点 舟山普陀山旅游攻略