提交 f3d5607f 编写于 作者: A afc163

update document for style import, #567

上级 3016ef05
......@@ -33,11 +33,22 @@ npm install antd
- 按需使用
```jsx
import 'antd/lib/index.css'; // 只需在页面入口模块引用一次
import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
引入样式:
```jsx
// only need to import once in entry module
import 'antd/lib/index.css';
```
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## 浏览器支持
现代浏览器和 IE8 及以上。
......
......@@ -32,11 +32,22 @@ npm install antd
- Use on demand
```jsx
import 'antd/lib/index.css'; // only need to import once in entry module
import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
Import style:
```jsx
// only need to import once in entry module
import 'antd/lib/index.css';
```
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## Browser Support
Normal browsers and Internet Explorer 8+.
......
......@@ -46,10 +46,19 @@ import Datepicker from 'antd/lib/datepicker';
ReactDOM.render(<Datepicker />, mountNode);
```
引入样式:
```jsx
import 'antd/lib/index.css'; // 样式需要在入口处引用一次
```
或者引入 less 文件,可用于主题配置:
```jsx
// or less for modifyVars
import 'antd/style/index.less';
```
## 版本
- 稳定版:[![npm package](http://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册