Transfer Effect
不推荐使用的版本:1.12
说明:将一个元素的轮廓转移到另一个元素
在尝试可视化两个元素之间的交互时非常有用。
传输元素本身具有类 ui-effects-transfer
,并且需要由您设置样式,例如通过添加背景或边框。
此效果已弃用,取而代之的是 .transfer() 方法。
例子:
点击绿色元素转移到另一个。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>transfer demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<style>
div.green {
width: 100px;
height: 80px;
background: green;
border: 1px solid black;
position: relative;
}
div.red {
margin-top: 10px;
width: 50px;
height: 30px;
background: red;
border: 1px solid black;
position: relative;
}
.ui-effects-transfer {
border: 1px dotted black;
}
</style>
<script src="//code.jquery.com/jquery-1.12.4.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<div class="green"></div>
<div class="red"></div>
<script>
$( "div" ).click(function() {
var i = 1 - $( "div" ).index( this );
$( this ).effect( "transfer", { to: $( "div" ).eq( i ) }, 1000 );
});
</script>
</body>
</html>
演示:
相关用法
- JQuery UI Tabs event用法及代码示例
- JQuery Mobile Toolbar hide用法及代码示例
- JQuery UI Tabs option用法及代码示例
- JQuery Mobile Textinput clearBtnText用法及代码示例
- JQuery UI Tooltip position用法及代码示例
- JQuery UI Tooltip disabled用法及代码示例
- JQuery Mobile Toolbar addBackBtn用法及代码示例
- JQuery UI Tooltip items用法及代码示例
- JQuery UI Tabs create( event, ui )用法及代码示例
- JQuery Mobile Textinput defaults用法及代码示例
- JQuery Mobile Toolbar defaults用法及代码示例
- JQuery Mobile Textinput preventFocusZoom用法及代码示例
- JQuery Mobile Textinput keyupTimeoutBuffer用法及代码示例
- JQuery UI Tabs _getList用法及代码示例
- JQuery Mobile Table classes用法及代码示例
- JQuery UI Tabs heightStyle用法及代码示例
- JQuery UI Tooltip track用法及代码示例
- JQuery Mobile Toolbar disabled用法及代码示例
- JQuery Mobile Table disabled用法及代码示例
- JQuery Mobile Toolbar disablePageZoom用法及代码示例
- JQuery Mobile Textinput disable用法及代码示例
- JQuery UI Tabs enable用法及代码示例
- JQuery Mobile Toolbar tapToggle用法及代码示例
- JQuery Mobile Toolbar visibleOnPageShow用法及代码示例
- JQuery UI Tooltip open用法及代码示例
注:本文由纯净天空筛选整理自jqueryui.com大神的英文原创作品 Transfer效果。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。