引入 : import { Icon } from 'antd';antd
1 <Icon 2 type = "home" //圖標樣式 3 theme = "filled" //風格,實心,描線,雙色等 (filled , outlined , twoTone) 4 spin //是否旋轉動畫 ,bollean ,false默認 5 twoToneColor = "#333" //雙色圖標設置,雙色圖標的主要顏色 6 />
1.如何使用阿里巴巴圖標動畫
const IconFont = Icon.createFromIconfontCN({ scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', //阿里巴巴圖標引用地址 }); ReactDOM.render( <div className="icons-list"> <IconFont type="icon-tuichu" /> <IconFont type="icon-facebook" /> <IconFont type="icon-twitter" /> </div>, mountNode );