如何使可拖动项目覆盖在图像上
how to make draggable item be overlay over image
我试图在拖动时覆盖图像,但在移动文本区域时也会移动图像。所以我希望我的编辑区域是透明的和覆盖图像。请帮助
这是我的
<head>
<style>
.positionable {
width:100px; height:100px;
position:absolute;
}
.dragRegion {
background-color:#FFF; color:#000;
cursor:move;
top: -2px; left: -2px;
position: absolute;
font-size:14px; line-height:14px;
margin: -5px;
padding-left: 10px;
padding-top: 10px;
background-image:url('arrow_move.png');
background-repeat:no-repeat;
}
.editable {
width: 150px; height: 150px; padding: 0.5em;
position:relative;
}
</style>
</head>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js" type="text/javascript"></script>
<div class="positionable">
<div class="dragRegion"/>
<textarea id="resizable" rows="5" cols="20"></textarea>
<img src="http://static.jquery.com/files/rocker/images/logo_jquery_215x53.gif" style="z-index: 100" />
<script type="text/javascript">
$('.positionable').draggable({handle: '.dragRegion'});
$('.editable').resizable();
</script>
</div>
对可拖动对象使用z索引。例如:
.dragRegion {
z-index:500
.... old css code
}
您在CSS 中设置代码
相关文章:
- 点击(右键点击)使用传单地图库获取图像覆盖的像素坐标
- 将谷歌地图中的平移边界设置为图像覆盖
- Javascript或PHP水印或将图像覆盖到图像上
- 如何在滚动/调整大小时保持背景图像覆盖屏幕
- 在 webGL 中用.jpg图像覆盖矩形
- JQUERY图像覆盖渐变in()在鼠标悬停时淡入淡出
- 谷歌地图:更新图像覆盖
- 无法使用图像覆盖添加bing主题
- 是否可以在传单中拉伸图像覆盖
- 推特引导程序,旋转木马上的图像覆盖
- 屏幕上的图像覆盖切换按钮
- 画布:理解globalCompositeOperation擦除部分图像覆盖
- 使用BringToFront()时图像覆盖状态丢失:传单
- 图像覆盖PHP生成的项目
- preserveAspectRatio模式图像在SVG中,如css背景图像覆盖
- 单击删除视频上的图像覆盖
- 鼠标悬停时,一个图像覆盖另一个图像
- Jquery图像覆盖
- JavaScript图像覆盖web应用程序
- 如何获得背景图像覆盖与100%的高度