diff --git a/docs/zh/README.md b/docs/zh/README.md index 35f5d6b..f4eef0e 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -80,7 +80,7 @@ module.exports = { #### 更改动画方向 -Use the `direction-{keyword}` utilities to control an element’s `animation-delay`. +使用 `direction-{keyword}` 标签控制元素的`animation-delay`. ```html @@ -89,11 +89,11 @@ Use the `direction-{keyword}` utilities to control an element’s `animation-del ``` -Learn more in the [animation direction](/docs/animation-direction.md) documentation. +查看更多与 [animation direction](/docs/animation-direction.md) 相关的文档 -#### Changing animation duration +#### 更改动画持续时间 -Use the `duration-{amount}` utilities to control an element’s `animation-duration`. +使用 `delay-{amount}` 标签控制元素的 `animation-delay`. ```html @@ -103,9 +103,9 @@ Use the `duration-{amount}` utilities to control an element’s `animation-durat Learn more in the [animation duration](/docs/animation-duration.md) documentation. -#### Changing animation fill mode +#### 更改动画不播放时要应用到元素的样式(animation-fill-mode) -Use the `fill-mode-{keyword}` utilities to control an element’s `animation-fill-mode`. +使用 `direction-{keyword}` 标签控制元素的`animation-delay`. ```html @@ -114,11 +114,11 @@ Use the `fill-mode-{keyword}` utilities to control an element’s `animation-fil ``` -Learn more in the [animation fill mode](/docs/animation-fill-mode.md) documentation. +查看更多与 [animation fill mode](/docs/animation-fill-mode.md) 相关的文档 -#### Changing animation iteration count +#### 更改动画重复次数 -Use the `repeat-{amount}` utilities to control an element’s `animation-iteration-count`. +使用 `delay-{amount}` 标签控制元素的 `animation-delay`. ```html @@ -128,9 +128,9 @@ Use the `repeat-{amount}` utilities to control an element’s `animation-iterati Learn more in the [animation iteration count](/docs/animation-iteration-count.md) documentation. -#### Changing animation play state +#### 更改动画播放状态 -Use the `running` and `paused` utilities to control an element’s `animation-play-state`. +使用 `direction-{keyword}` 标签控制元素的`animation-delay`. ```html @@ -139,9 +139,9 @@ Use the `running` and `paused` utilities to control an element’s `animation-pl Learn more in the [animation play state](/docs/animation-play-state.md) documentation. -#### Changing animation timing function +#### 更改动画速度曲线 -Use the `ease-{keyword}` utilities to control an element’s `animation-timing-function`. +使用 `direction-{keyword}` 标签控制元素的`animation-delay`. ```html @@ -152,19 +152,19 @@ Use the `ease-{keyword}` utilities to control an element’s `animation-timing-f Learn more in the [animation timing function](/docs/animation-timing-function.md) documentation. -#### Prefers-reduced-motion +#### 减少运动媒体查询 -For situations where the user has specified that they prefer reduced motion, you can conditionally apply animations and transitions using the `motion-safe` and `motion-reduce` variants: +如果用户指定他们喜欢减少动作, 您可以使用 `motion-safe` 和 `motion-reduc` 变量来有条件地应用动画和过渡: ```html ``` -### Enter & Exit Animations +### 进入以及退出动画 -### Adding enter animations +### 添加进入动画 -To give an element an enter animation, use the `animate-in` utility, in combination with some [`fade-in`](/docs/enter-animation-scale.md), [`spin-in`](/docs/enter-animation-rotate.md), [`zoom-in`](/docs/enter-animation-scale.md), and [`slide-in-from`](/docs/enter-animation-translate.md) utilities. +要给元素定义进入动画,请使用 `animate-in` ,并结合一些 [`fade-in`](/docs/enter-animation-scale.md), [`spin-in`](/docs/enter-animation-rotate.md) [`zoom-in`](/docs/enter-animation-scale.md), 和 [`slide-in-from`](/docs/enter-animation-translate.md) ```html @@ -176,9 +176,9 @@ To give an element an enter animation, use the `animate-in` utility, in combinat Learn more in the [enter animation](/docs/enter-animation.md) documentation. -### Adding exit animations +### 添加退出动画 -To give an element an exit animation, use the `animate-out` utility, in combination with some [`fade-out`](/docs/exit-animation-scale.md), [`spin-out`](/docs/exit-animation-rotate.md), [`zoom-out`](/docs/exit-animation-scale.md), and [`slide-out-from`](/docs/exit-animation-translate.md) utilities. +要给元素定义进入动画,请使用 `animate-in` ,并结合一些 [`fade-in`](/docs/enter-animation-scale.md), [`spin-in`](/docs/enter-animation-rotate.md) [`zoom-in`](/docs/enter-animation-scale.md), 和 [`slide-in-from`](/docs/enter-animation-translate.md) ```html @@ -190,9 +190,9 @@ To give an element an exit animation, use the `animate-out` utility, in combinat Learn more in the [exit animation](/docs/exit-animation.md) documentation. -#### Changing enter animation starting opacity +#### 更改进入动画时的不透明度 -Set the starting opacity of an animation using the `fade-in-{amount}` utilities. +使用 `fade-in-{amount}` 设置动画的初始不透明度 ```html @@ -203,7 +203,7 @@ Set the starting opacity of an animation using the `fade-in-{amount}` utilities. Learn more in the [enter animation opacity](/docs/enter-animation-opacity.md) documentation. -#### Changing enter animation starting rotation +#### 更改进入动画时的旋转角度 Set the starting rotation of an animation using the `spin-in-{amount}` utilities. @@ -216,7 +216,7 @@ Set the starting rotation of an animation using the `spin-in-{amount}` utilities Learn more in the [enter animation rotate](/docs/enter-animation-rotate.md) documentation. -#### Changing enter animation starting scale +#### 更改进入动画时的缩放 Set the starting scale of an animation using the `zoom-in-{amount}` utilities. @@ -229,22 +229,22 @@ Set the starting scale of an animation using the `zoom-in-{amount}` utilities. Learn more in the [enter animation scale](/docs/enter-animation-scale.md) documentation. -#### Changing enter animation starting translate +#### 更改进入动画时的位移 -Set the starting translate of an animation using the `slide-in-from-{direction}-{amount}` utilities. +使用 `slide-in-from-{direction}-{amount}` 设置动画开始的位移 ```html - - - + + + ``` Learn more in the [enter animation translate](/docs/enter-animation-translate.md) documentation. -#### Changing exit animation ending opacity +#### 更改退出动画时的不透明度 -Set the ending opacity of an animation using the `fade-out-{amount}` utilities. +使用 `fade-out-{amount}` 设置动画结束时的不透明度 ```html @@ -255,9 +255,9 @@ Set the ending opacity of an animation using the `fade-out-{amount}` utilities. Learn more in the [exit animation opacity](/docs/exit-animation-opacity.md) documentation. -#### Changing exit animation ending rotation +#### 更改退出动画时的旋转 -Set the ending rotation of an animation using the `spin-out-{amount}` utilities. +使用 `spin-out-{amount}`设置动画结束时的旋转角度 ```html @@ -268,9 +268,9 @@ Set the ending rotation of an animation using the `spin-out-{amount}` utilities. Learn more in the [exit animation rotate](/docs/exit-animation-rotate.md) documentation. -#### Changing exit animation ending scale +#### 更改退出动画时的缩放 -Set the ending scale of an animation using the `zoom-out-{amount}` utilities. +使用 `zoom-out-{amount}`设置动画结束时的缩放 ```html @@ -281,15 +281,15 @@ Set the ending scale of an animation using the `zoom-out-{amount}` utilities. Learn more in the [exit animation scale](/docs/exit-animation-scale.md) documentation. -#### Changing exit animation ending translate +#### 更改退出动画时的位移 -Set the ending translate of an animation using the `slide-out-to-{direction}-{amount}` utilities. +使用 `slide-out-to-{direction}-{amount}` 设置动画结束时的位移 ```html - - - + + + ``` Learn more in the [exit animation translate](/docs/exit-animation-translate.md) documentation. diff --git a/docs/zh/docs/zh/README.md b/docs/zh/docs/zh/README.md new file mode 100644 index 0000000..35f5d6b --- /dev/null +++ b/docs/zh/docs/zh/README.md @@ -0,0 +1,295 @@ +# `tailwindcss-animate` + +> 一个用于构建精美动画的Tailwind CSS插件 + +```html +<!-- 添加淡入淡出和缩放出现效果的动画——> +
...
+ + +
...
+ + +
...
+ + +
. 。
+ + +``` + +## 安装 + +Install the plugin from npm: + +```sh +npm install -D tailwindcss-animate +``` + +之后将插件添加到您的 `tailwind.config.js` 文件: + +```js +// @filename tailwind.config.js +module.exports = { + theme: { + // ... + }, + plugins: [ + require("tailwindcss-animate"), + // ... + ], +} +``` + +## 文档 + +- [基本用法](#basic-usage) + - [更改动画延迟](#changing-animation-delay) + - [更改动画方向](#changing-animation-direction) + - [更改动画持续时间](#changing-animation-duration) + - [更改动画填充模式](#changing-animation-fill-mode) + - [更改动画重复次数](#changing-animation-iteration-count) + - [更改动画播放状态](#changing-animation-play-state) + - [更改动画时序方式](#changing-animation-timing-function) + - [减少动效](#prefers-reduced-motion) +- [进入以及推出动画](#enter-and-exit-animations) + - [添加进入动画](#adding-enter-animations) + - [添加退出动画](#adding-exit-animations) + - [更改进入动画时的不透明度](#changing-enter-animation-starting-opacity) + - [更改进入动画时的旋转](#changing-enter-animation-starting-rotation) + - [更改进入动画时的缩放](#changing-enter-animation-starting-scale) + - [更改进入动画时的变换](#changing-enter-animation-starting-translate) + - [更改退出动画时的不透明度](#changing-exit-animation-ending-opacity) + - [更改退出动画时的旋转](#changing-exit-animation-ending-rotation) + - [更改退出动画时的缩放](#changing-exit-animation-ending-scale) + - [更改退出动画时的变换](#changing-exit-animation-ending-translate) + +### 基本用法 + +#### 更改动画延迟 + +使用 `delay-{amount}` 标签控制元素的 `animation-delay`. + +```html + + + +``` + +查看更多与 [animation delay](/docs/animation-delay.md) 相关的文档 + +#### 更改动画方向 + +Use the `direction-{keyword}` utilities to control an element’s `animation-delay`. + +```html + + + + +``` + +Learn more in the [animation direction](/docs/animation-direction.md) documentation. + +#### Changing animation duration + +Use the `duration-{amount}` utilities to control an element’s `animation-duration`. + +```html + + + +``` + +Learn more in the [animation duration](/docs/animation-duration.md) documentation. + +#### Changing animation fill mode + +Use the `fill-mode-{keyword}` utilities to control an element’s `animation-fill-mode`. + +```html + + + + +``` + +Learn more in the [animation fill mode](/docs/animation-fill-mode.md) documentation. + +#### Changing animation iteration count + +Use the `repeat-{amount}` utilities to control an element’s `animation-iteration-count`. + +```html + + + +``` + +Learn more in the [animation iteration count](/docs/animation-iteration-count.md) documentation. + +#### Changing animation play state + +Use the `running` and `paused` utilities to control an element’s `animation-play-state`. + +```html + + +``` + +Learn more in the [animation play state](/docs/animation-play-state.md) documentation. + +#### Changing animation timing function + +Use the `ease-{keyword}` utilities to control an element’s `animation-timing-function`. + +```html + + + + +``` + +Learn more in the [animation timing function](/docs/animation-timing-function.md) documentation. + +#### Prefers-reduced-motion + +For situations where the user has specified that they prefer reduced motion, you can conditionally apply animations and transitions using the `motion-safe` and `motion-reduce` variants: + +```html + +``` + +### Enter & Exit Animations + +### Adding enter animations + +To give an element an enter animation, use the `animate-in` utility, in combination with some [`fade-in`](/docs/enter-animation-scale.md), [`spin-in`](/docs/enter-animation-rotate.md), [`zoom-in`](/docs/enter-animation-scale.md), and [`slide-in-from`](/docs/enter-animation-translate.md) utilities. + +```html + + + + + +``` + +Learn more in the [enter animation](/docs/enter-animation.md) documentation. + +### Adding exit animations + +To give an element an exit animation, use the `animate-out` utility, in combination with some [`fade-out`](/docs/exit-animation-scale.md), [`spin-out`](/docs/exit-animation-rotate.md), [`zoom-out`](/docs/exit-animation-scale.md), and [`slide-out-from`](/docs/exit-animation-translate.md) utilities. + +```html + + + + + +``` + +Learn more in the [exit animation](/docs/exit-animation.md) documentation. + +#### Changing enter animation starting opacity + +Set the starting opacity of an animation using the `fade-in-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [enter animation opacity](/docs/enter-animation-opacity.md) documentation. + +#### Changing enter animation starting rotation + +Set the starting rotation of an animation using the `spin-in-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [enter animation rotate](/docs/enter-animation-rotate.md) documentation. + +#### Changing enter animation starting scale + +Set the starting scale of an animation using the `zoom-in-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [enter animation scale](/docs/enter-animation-scale.md) documentation. + +#### Changing enter animation starting translate + +Set the starting translate of an animation using the `slide-in-from-{direction}-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [enter animation translate](/docs/enter-animation-translate.md) documentation. + +#### Changing exit animation ending opacity + +Set the ending opacity of an animation using the `fade-out-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [exit animation opacity](/docs/exit-animation-opacity.md) documentation. + +#### Changing exit animation ending rotation + +Set the ending rotation of an animation using the `spin-out-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [exit animation rotate](/docs/exit-animation-rotate.md) documentation. + +#### Changing exit animation ending scale + +Set the ending scale of an animation using the `zoom-out-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [exit animation scale](/docs/exit-animation-scale.md) documentation. + +#### Changing exit animation ending translate + +Set the ending translate of an animation using the `slide-out-to-{direction}-{amount}` utilities. + +```html + + + + +``` + +Learn more in the [exit animation translate](/docs/exit-animation-translate.md) documentation.