Styled-components--V4 injectGlobal的弃用
来源:7-1 项目目录搭建,Styled-Components 与 Reset.css 的结合使用
慕仰0375298
2019-08-27
你好老师
Styled-components–V4 injectGlobal的弃用.
这个库的injectGlobal 弃用了你没有更新课程,这样会让我们新手无法下手呀
9回答
-
好的同学,我后续会更新课程的
182020-11-02 -
weixin_慕婉清4291786
2020-01-06
import { createGlobalStyle } from 'styled-components'
createGlobalStyle`
```
`;
30 -
zzzzzxxx
2019-12-18
可以参考以下这个https://blog.csdn.net/purple_lumpy/article/details/88775199
212019-12-18 -
杨晨11
2020-07-06
import {createGlobalStyle} from 'styled-components' export const GlobalStyle = createGlobalStyle` html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } `
10 -
Lusiano
2019-11-01
import styled from 'styled-components';
const Wrapper = styled.body `margin: 0;
padding: 0;
font-family: sans-serif;
background-color: green;`
export default Wrapper
然后在index.js引一下Wrapper,用Wrapper包裹App组件
112019-11-01 -
慕仔1138189
2020-10-27
不太会更新了
00 -
慕仙4324424
2020-05-22
等老师,不如自己多查查,提高动手能力
00 -
THE_BEST_1994
2019-11-02
更新了吗
00 -
慕的地5408112
2019-10-19
欢迎老师及时更新,非常感谢
00