Commit 05560f7a by fukai

提交css示例

parent 8513aa97
...@@ -6,6 +6,7 @@ import Test01 from '../views/test01' ...@@ -6,6 +6,7 @@ import Test01 from '../views/test01'
import SelectPage from '../views/selectPage' import SelectPage from '../views/selectPage'
import Index from "../views/IndexPage" import Index from "../views/IndexPage"
import AddPage from "../views/AddPage" import AddPage from "../views/AddPage"
import CssPage from "../views/cssPage"
export default class AppRouter extends Component{ export default class AppRouter extends Component{
...@@ -18,6 +19,7 @@ export default class AppRouter extends Component{ ...@@ -18,6 +19,7 @@ export default class AppRouter extends Component{
<Route path="/test01" component={Test01} /> <Route path="/test01" component={Test01} />
<Route path="/select" component={SelectPage} /> <Route path="/select" component={SelectPage} />
<Route path="/add" component={AddPage} /> <Route path="/add" component={AddPage} />
<Route path="/cssPage" component={CssPage} />
</div> </div>
</Router> </Router>
) )
......
...@@ -10,6 +10,7 @@ export default function(){ ...@@ -10,6 +10,7 @@ export default function(){
<li><Link to="select">SelectPage</Link></li> <li><Link to="select">SelectPage</Link></li>
<li><Link to="add">AddPage</Link></li> <li><Link to="add">AddPage</Link></li>
<li><Link to="test01">Test01</Link></li> <li><Link to="test01">Test01</Link></li>
<li><Link to="cssPage">CssPage</Link></li>
</ul> </ul>
</div> </div>
) )
......
import React,{Component} from 'react'
import "./index.less"
export default function (){
return (<div class="cssPage">
<p>
我是一组文件
</p>
<h1>
我是一组文件
</h1>
<h2 id="wh2">
我是一组文件
</h2>
<h2 >
我是一组文件
</h2>
</div>)
}
\ No newline at end of file
.cssPage{
color: red ;
}
.cssPage p{
color:blue
}
#wh2{
color: green;
}
.cssPage h1,h2{
text-align: center;
}
/**
class 选择器
id 选择器
层级选择器
**/
\ No newline at end of file
.cssPage{
color: red ;
p{
color:blue
}
#wh2{
color: green;
}
h1,h2{
text-align: center;
}
}
/**
class 选择器
id 选择器
层级选择器
**/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment