Blind Effect
说明:百叶窗效果通过将元素包在容器中,并“拉动百叶窗”来隐藏或显示元素
-
blind
-
direction(默认:
"up"
)类型:String将拉动百叶窗以隐藏元素的方向,或将显示元素的方向。
可能的值:
up
、down
、left
、right
、vertical
、horizontal
。
-
容器应用了overflow: hidden
,因此高度变化会影响可见的内容。
例子:
使用盲效果切换 div。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>blind demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
<style>
#toggle {
width: 100px;
height: 100px;
background: #ccc;
}
</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>
<p>Click anywhere to toggle the box.</p>
<div id="toggle"></div>
<script>
$( document ).click(function() {
$( "#toggle" ).toggle( "blind" );
});
</script>
</body>
</html>
演示:
相关用法
- JQuery UI Button classes用法及代码示例
- JQuery UI Buttonset widget用法及代码示例
- JQuery UI Button disabled用法及代码示例
- JQuery UI Buttonset destroy用法及代码示例
- JQuery UI Button create( event, ui )用法及代码示例
- JQuery Mobile Button icon用法及代码示例
- JQuery Mobile Button corners用法及代码示例
- JQuery UI Buttonset refresh用法及代码示例
- JQuery UI Button icon用法及代码示例
- JQuery Mobile Button initSelector用法及代码示例
- JQuery UI Buttonset option用法及代码示例
- JQuery UI Buttonset items用法及代码示例
- JQuery UI Bounce效果用法及代码示例
- JQuery UI Buttonset disable用法及代码示例
- JQuery UI Button destroy用法及代码示例
- JQuery Mobile Button theme用法及代码示例
- JQuery UI Button enable用法及代码示例
- JQuery UI Buttonset disabled用法及代码示例
- JQuery UI Button disable用法及代码示例
- JQuery UI Button widget用法及代码示例
- JQuery UI Buttonset create( event, ui )用法及代码示例
- JQuery UI Buttonset instance用法及代码示例
- JQuery UI Button instance用法及代码示例
- JQuery UI Button showLabel用法及代码示例
- JQuery UI Buttonset enable用法及代码示例
注:本文由纯净天空筛选整理自jqueryui.com大神的英文原创作品 Blind效果。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。