mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
66c3639ed4
* chore: bump rc-dialog version * chore: trigger * chore: trigger * docs: RM peer conflict demo * chore: bump deps version * chore: bump ver * chore: bump * chore: bump * chore: test * chore: rm peer * chore: clean all peer * chor: bump rc-image
34 lines
805 B
Markdown
34 lines
805 B
Markdown
---
|
|
order: 6.1
|
|
title:
|
|
zh-CN: 轮播的公告
|
|
en-US: Loop Banner
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
配合 [react-text-loop-next](https://npmjs.com/package/react-text-loop-next) 或 [react-fast-marquee](https://npmjs.com/package/react-fast-marquee) 实现消息轮播通知栏。
|
|
|
|
## en-US
|
|
|
|
Show a loop banner by using with [react-text-loop-next](https://npmjs.com/package/react-text-loop-next) or [react-fast-marquee](https://npmjs.com/package/react-fast-marquee).
|
|
|
|
```tsx
|
|
import { Alert } from 'antd';
|
|
import React from 'react';
|
|
import Marquee from 'react-fast-marquee';
|
|
|
|
const App: React.FC = () => (
|
|
<Alert
|
|
banner
|
|
message={
|
|
<Marquee pauseOnHover gradient={false}>
|
|
I can be a React component, multiple React components, or just some text.
|
|
</Marquee>
|
|
}
|
|
/>
|
|
);
|
|
|
|
export default App;
|
|
```
|