美文网首页
2.使用styled-components 管理样式文件

2.使用styled-components 管理样式文件

作者: 伯言z | 来源:发表于2018-09-28 13:15 被阅读0次

1. 安装 styled-components    ===>>>  npm i styled-components 

2.使用 

    设置全局样式===>>>  

修改文件名 全局样式 运行效果

3.组件书写 ===>>> 

HeaderWrapper组件 引用 效果

  官方文档:https://www.styled-components.com/

相关文章

网友评论

      本文标题:2.使用styled-components 管理样式文件

      本文链接:https://www.haomeiwen.com/subject/qgauoftx.html