選擇器也可以繼承其他CSS文件里面的規則。
[`another.css`](https://github.com/ruanyf/css-modules-demos/blob/master/demo05/components/another.css)
~~~
.className {
background-color: blue;
}
~~~
[`App.css`](https://github.com/ruanyf/css-modules-demos/blob/master/demo05/components/App.css)可以繼承`another.css`里面的規則。
~~~
.title {
composes: className from './another.css';
color: red;
}
~~~
運行這個示例。
~~~
$ npm run demo05
~~~
打開`http://localhost:8080`,會[看到](http://ruanyf.github.io/css-modules-demos/demo05/)藍色的背景上有一個紅色的`h1`。