您的位置: 首页 > 文章 > react 中 styled components 简单使用 react 中 styled components 简单使用 分类: 文章 • 2024-02-17 23:18:35 react 中 styled components 简单使用 1. cnpm i styled-components -S || yarn add styled-components 在 node 环境中安装 import styled from ‘styled-components’; 加载此组件 const CardStyle = styled(Card)& .ant-card-body { max-height: 275px; overflow: auto; }