このページのトップへ
カスタムボタンアニメーション

カスタムボタンアニメーション

Wix Animations APIを使って、時計回りに回転し、クリックすると色が変わるカスタムボタンを作成しましょう。

中級.png

初心者

5K

出版された:

August 11, 2021

酒を楽しむ少女

によって

アンカー 1
開発者を雇う

説明例

This example demonstrates how to layer elements on top of each other to create an illusion of a custom button with animation.

コード例

タブ1

.

タブ2

.

タブ3

.

このコードによる解決は複雑になる可能性がある。

どのように構築したか

ページ要素

 

In our site we added 2 groups of page elements with the Group 1 layered on top of Group 2:

  • Group 1: A text element and a pink vector image.

  • Group 2: Identical text element and vector image shape, but this vector image is white.

 

 

コード

 

In the  $w.onReady() function we declare the two groups of page elements. We then create the animation timeline:

  1. Change the opacity of Group 1 to 0, hiding it from the page. Group 2 which is underneath, is shown in its place.

  2. Rotate Group 2 by 360 degrees.

  3. Change the opacity of Group1 back to 1, showing it again on the page.

 

Last, we added an onClick() event handler to Group 1, to function as a button and trigger the animation when Group 1 is clicked.

使用したAPI

コード以外の例。

関連記事

記事リンク

開発者を雇う

Veloソリューションは強力なツールですが、自力で構築するのは困難です。経験豊富なVelo開発会社に構築をお任せください。

関連例

これは役に立ったか?

はい

|

いいえ

ご意見ありがとう!

砂時計アニメーション

砂時計アニメーション

Wix Animations APIを使って、砂時計を自動的に、またはボタンクリックで反転させましょう。

中級.png

上級

ボール落としアニメーション

ボール落としアニメーション

ボールが迷路の中を落ちていくボール落としアニメーションを作成し、言葉の中のIの文字を点描しましょう。

中級.png

上級

ベクター画像アニメーション

ベクター画像アニメーション

ボールが動き、あなたの言葉のOの文字の代わりになるアニメーションを作成します。

中級.png

初心者

テキスト・マイクロインタラクション

テキスト・マイクロインタラクション

Wix Animations APIを使って、3つのテキスト要素に異なるマイクロインタラクションを作成しよう。

中級.png

中級

太陽系アニメーション

太陽系アニメーション

Wix Animations APIを使って、シンプルな太陽系アニメーションを作成しましょう。

中級.png

上級

アンカー2
ページ下