当前位置: 首页 > 工具软件 > linaria > 使用案例 >

taro 中使用 styled-components 语法 linaria/react 动画 keyframes

夏侯航
2023-12-01

Taro css-in-js 方案
https://github.com/callstack/linaria/tree/master/docs

import { styled } from "linaria/react";
const Title = styled(Text)`
  font-weight: bold;
  color: #ffffff;
  margin: 10vh 0;
  font-size: 2rem;
  letter-spacing: 2px;
  animation: fade 2s linear;

  @keyframes fade {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
`;
 类似资料: