Pulsate 效果可以与effect()方法一起使用。这会使元素的不透明性产生多次脉冲。
Pulsate - 语法
selector.effect( "pulsate", {arguments}, speed );
这是所有参数的描述-
times - 脉动的时间。默认值为3。
model - 效果的模式。可以是"显示(show)","隐藏(hide)"。默认值为"show"。
Pulsate - 示例
以下是一个简单的示例,简单说明了此效果的用法-
<html><head><title>The jQuery Example</title><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script><script type="text/javascript" language="javascript">$(document).ready(function() {$("#button").click(function(){$(".target").effect( "pulsate", {times:5}, 3000 );});});</script><style>p {background-color:#bca; width:200px; border:1px solid green;}div{ width:100px; height:100px; background:red;}</style></head><body><p>Click the button</p><button id="button"> Pulsate </button><div class="target"></div></body> </html>
这将产生以下输出-
jQuery 中的 Pulsate方法函数 - 无涯教程网无涯教程网提供Pulsate 效果可以与effect()方法一起使用。这会使元素的不透明性产生多次脉冲。 Pulsa...https://www.learnfk.com/jquery/effect-pulsate.html