> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# animation-name

APISummary
## Introduction

`animation-name` property specifies a list of animations to apply to an element. Each name refers to an animation sequence defined by [@keyframes](https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes).

## Examples

**This is an example below: css-api**

**Entry:** `src/animation-name`
**Bundle:** `dist/animation-name.lynx.bundle`

```tsx
import { root, useState } from "@lynx-js/react";
import "./index.scss";
import lynxImage from "../../resource/lynxicon.png";

const Keyframes = () => {
  const [flag, setFlag] = useState(true);

  const transProperties = ["translateX", "translateY", "translateXY"];
  const rotateProperties = ["rotateZ", "rotateX", "rotateY"];
  const scaleProperties = ["scaleX", "scaleY", "scaleXY"];
  const flipProperties = ["flipX", "flipY", "flipXY"];
  const otherProperties = ["background-color", "opacity"];

  const heightStyle = {
    height: "200rpx",
  };

  const widthStyle = {
    width: "250rpx",
  };

  const rotateHeightStyle = {
    height: "150rpx",
  };

  const scaleImageStyle = {
    marginLeft: "15px",
    marginTop: "30px",
  };

  const otherStyle = {
    marginLeft: "15px",
    marginTop: "15px",
  };

  return (
    <scroll-view scroll-orientation="vertical" className="fd-col container">
      <text className="h1">keyframes animation</text>
      <view className="sep"></view>
      <view className="fd-col group pd5">
        <text className="button h2">translate animation</text>
        <view className="fd-row" style={heightStyle}>
          {transProperties.map((item, index) => (
            <view style={widthStyle} key={`trans-${index}`} className="fd-col mg5">
              <text className="h3 mgl15">{item}</text>
              <image
                style={{ animation: `${item}-ani 2s ease 0s infinite alternate both running` }}
                className="ani-size mg5 mgl15 mgt15"
                src={lynxImage}
              />
            </view>
          ))}
        </view>
      </view>
      <view className="sep"></view>

      <view className="fd-col group pd5">
        <text className="button h2">rotate animation</text>
        <view className="fd-row" style={rotateHeightStyle}>
          {rotateProperties.map((item, index) => (
            <view style={widthStyle} key={`rotate-${index}`} className="fd-col mg5">
              <text className="h3 mgl15">{item}</text>
              <image
                style={{ animation: `${item}-ani 2s ease 0s infinite alternate both running` }}
                className="ani-size mg5 mgl15 mgt15"
                src={lynxImage}
              />
            </view>
          ))}
        </view>
      </view>
      <view className="sep"></view>

      <view className="fd-col group pd5">
        <text className="button h2">scale animation</text>
        <view className="fd-row" style={heightStyle}>
          {scaleProperties.map((item, index) => (
            <view style={widthStyle} key={`scale-${index}`} className="fd-col mg5">
              <text className="h3 mgl15">{item}</text>
              <image
                style={{ animation: `${item}-ani 2s ease 0s infinite alternate both running`, ...scaleImageStyle }}
                className="ani-size"
                src={lynxImage}
              />
            </view>
          ))}
        </view>
      </view>
      <view className="sep"></view>

      <view className="fd-col group pd5">
        <text className="button h2">flip animation</text>
        <view className="fd-row" style={heightStyle}>
          {flipProperties.map((item, index) => (
            <view style={widthStyle} key={`flip-${index}`} className="fd-col mg5">
              <text className="h3 mgl15">{item}</text>
              <image
                style={{ animation: `${item}-ani 2s ease 0s infinite alternate both running` }}
                className="ani-size mg5 mgl15 mgt15"
                src={lynxImage}
              />
            </view>
          ))}
        </view>
      </view>
      <view className="sep"></view>

      <view className="fd-col group pd5">
        <text className="button h2">bg-color opacity animation</text>
        <view className="fd-row" style={heightStyle}>
          {otherProperties.map((item, index) => (
            <view style={widthStyle} key={`other-${index}`} className="fd-col mg5">
              <text className="h4 mgl15">{item}</text>
              <view className="base"></view>
              <view
                style={{
                  animation: `${item}-ani 2s ease 0s infinite alternate both ${flag ? "running" : "paused"}`,
                  ...otherStyle,
                }}
                className="ani-size"
              />
            </view>
          ))}
        </view>
      </view>
      <view className="sep"></view>
    </scroll-view>
  );
};

root.render(<Keyframes />);

```

v0.11.0



## Syntax

```css
/* Single animation */
animation-name: none;
animation-name: test_05;
animation-name: -specific;
animation-name: sliding-vertically;

/* Multiple animations */
animation-name: test1, animation4;
animation-name:
  none,
  -moz-specific,
  sliding;
```

::: info
Animation names are case-sensitive. The identifier must follow these naming rules, otherwise it may be treated as invalid.
:::

## Formal definition

| Initial value | none |
| Applies to | all elements |
| Inherited | no |
| Animatable | no |


## Formal syntax

```
animation-name: <string>;
```

## See also

- [animation](/next/api/css/properties/animation.md)
- [animation-name](/next/api/css/properties/animation-name.md)
- [animation-duration](/next/api/css/properties/animation-duration.md)
- [animation-timing-function](/next/api/css/properties/animation-timing-function.md)
- [animation-delay](/next/api/css/properties/animation-delay.md)
- [animation-iteration-count](/next/api/css/properties/animation-iteration-count.md)
- [animation-direction](/next/api/css/properties/animation-direction.md)
- [animation-fill-mode](/next/api/css/properties/animation-fill-mode.md)
- [animation-play-state](/next/api/css/properties/animation-play-state.md)
- [CSS animation event](/next/api/lynx-api/event/animation-event.md)
- [Animated API](/next/api/lynx-api/lynx/lynx-animate-api.md)

## Compatibility

**Compatibility Table**

**Query:** `css.properties.animation-name`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/65-animation-name.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-name)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| animation-name | Yes (1.0) | Yes (3.4) | Yes (1.0) | Yes (1.0) | Yes (1.0) | Yes |

**`animation-name`**

**Specifications:**

