如何使用jQuery UI开发Web程序(14)

 时间:2026-02-14 02:40:45

1、访问 jQuery UI官网,进入【API Documentation】页面,如下图所示。

如何使用jQuery UI开发Web程序(14)

2、Effects之Clip Effect,The clip effect will hide or show an element by clipping the element vertically or horizontally.Clip Effect HTML基本结构以及Clip Effect用法如下图所示。

如何使用jQuery UI开发Web程序(14)

3、Click anywhere to toggle the box.(点击任何地方切换盒子)如下图所示。

如何使用jQuery UI开发Web程序(14)

4、direction (default: "up")

Type: String

The plane in which the clip effect will hide or show its element.

vertical clips the top and bottom edges, while horizontal clips the right and left edges.

如何使用jQuery UI开发Web程序(14)

5、Color Animation,

jQuery UI effects core adds the ability to animate color properties using rgb(), rgba(), hex values, or even color names such as "aqua". Simply include the jQuery UI effects core file and .animate() will gain support for colors.

以下属性被支持:backgroundColor、borderBottomColor、borderLeftColor、borderRightColor、borderTopColor、color、columnRuleColor、outlineColor、textDecorationColor、textEmphasisColor

       Support for color animation comes from the jQuery Color plugin. 

         对颜色动画的支持来自于JQuery颜色插件

       The Color plugin provides several functions for working with colors. For full documentation, please see the jQuery Color documentation.

          该颜色插件提供了几种函数用来处理颜色。

6、     While there are use cases for directly animating individual color properties, it is often a better approach to contain the styles in a class. 

     jQuery UI provides a few methods which will animate the addition or removal of a CSS class, specifically .addClass(), .removeClass(), .toggleClass(), and .switchClass(). 

      These methods will automatically determine which properties need to change and apply the appropriate animations.

      这些方式自动决定哪些属性需要改变和应用合适的动画。

7、Color Animation案例,如下图所示。

如何使用jQuery UI开发Web程序(14)

8、点击【颜色动画】按钮前,如下图所示。

如何使用jQuery UI开发Web程序(14)

9、点击【颜色动画】按钮后,如下图所示。

如何使用jQuery UI开发Web程序(14)

  • 如何使用jQuery UI开发Web程序(10)
  • Web开发中如何应用Jquery UI
  • 如何使用jQuery框架
  • 如何使用JQuery
  • jquery插件怎么用
  • 热门搜索
    宝宝吐奶怎么回事 描写人物的方法 五菱宏光s1怎么样 松花蛋怎么做好吃 路由器安装方法 酸菜鱼的家常做法 鲅鱼怎么做好吃 肚子怎么减肥 网站推广方法 兔子怎么做好吃