? ?? ?? ????? ??? ??? ????. Parcel? ????? ??? ???? ?? ?? ???? ??? ? ?? ???? ?????. ???? ?? ??? ???? ?? ??? ?? Parcel? ???? ?? ?????. ? ??? ?? ?? ??? ??? ?? ?? ??? ??? ?? ?? ?? ?? ?? ?? ??? ???? ????? ????.
??? ?? ??? ??? ??? ????.
- ?? ?? ??? ?? ???? ?? ??.
- HTML, CSS ? JavaScript? ??? ??? ?? ??? ?? ??? ?? ??.
- ??? ??? ?? ????? ?? ????? ? ?? ?? (HMR).
- ?? ???? ?? ???? ??? ??? ?????.
- ?? ? ?? ??? ?????? ?? ?? ??.
- ???? ??? ???? ? ?? ????? ??? ? ?? ??.
? ????? Parcel? ???? React ????? ???? ??? ?? ?? React ?? ????? ??? ?????. ??? ?????? ?? ???? ?????.
???? ??
- ???? ???? ??? :
mkdir csstricks-react-parcel && cd $ _
-
package.json
??? : NPM ?? ?? ?? :
# npm npm init -y # ?? (? ?????? ??) ?? init -y
- ??? ?? : ?? ? ??? ??? ??????.
??? ?? ?? ??-???-?? ??-?? ??-???-??? ????? ?? ?? React React-Dom
- babel ?? : ?? ????
.babelrc
??? ????.
{ "?? ??": [ "Env", "React"] }
-
index.js
??? (? ?? ??) :
'React'?? React React; 'React-Dom'?? Reactdom ?? ??; ??? ?? ?? rect.component { ?? () { ?? ( <react.fragment><h2>?????!</h2></react.fragment> ); } } const rootElement = document.getElementById ( "root"); REACTDOM.RENDER (<app></app> , rootlement);
-
index.html
??? (src
????) :
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>?? ?? ?</title> <div id="root"></div>
- configure
package.json
(?? ????) :
"????": { "??": "node_env = ?? ?? src/index.html -Open" }
- ?? ???? ?? : ?????
yarn start
??????. ?? ??????http://localhost:1234/
?? ???????.
Sass?? ????
???? Postcs? ?????. SASS? ????? ??? ???? ??????.
?? ADD-DEV NODE-SASS AUTOPREFIXER
package.json
? postcss
??? ?????? (??? ??) :
"postcss": { "??": ??, "????": { "AutoPrefixer": { "????": [ "> 1%", "??? 4 ??", "Firefox ESR", "IE <h3> ?? ??</h3><p> ???? ??? ?? <code>package.json</code> ??????.</p><pre class="brush:php;toolbar:false"> "????": { "??": "node_env = ?? ?? src/index.html -open", "??": "node_env = ???? ?? ?? dist/ index.html--public-url ./" }
yarn build
???? dist
???? ???? ?? ??? ????. --out-dir
, --no-minify
? --no-cache
? ?? ??? ?? ??? ??? ?????.
??? (React App Parcel ???)
CRAP (React App Parcel) ?? ???? ??? ??????.
npx create-react-app-parcel my-app CD My-App ?? ??
??
Parcel? ?? ???? ??? ? ?? ??? ?? React ????? ??? ???????. ???? ?? (30,000 Github ??)? ???? ??? ?? ??????.
??
- ?? ?
- ?? ??
? ????? ?? ??? GitHub ??? (?? ? ??).
? ??? Parcel ?? RECT ?? ??????? ??? ?????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

CSS?? ????? ??? ? ?? ??? ????. 1. HTML ? CSS? ?? ??? ?????? ???? ?? ???? ?? ???? ??????. 2. ?? ??? ??? ?? ???? ???? ?? ?? ??? ?? ?? ??? ??????. 3. ??? ????? ???? JavaScript? ?? ???? ?????? ??? ?????. ? ?? ??? ??? ??? ????? ?? ??, ??, ??? ? ?? ???? ?? ?? ?? ??? ???? ?????.

CSS ???? ??? ? ??? ??? ????? ???? ??? ???? ???? ?? ?? ???? ????? ???????. 1. Flexbox ? ??? ??? ?? ???? ??? ??, ?? : ??? ?? ? ????? ??? ????. 2. Caniuse ?? ?? ?? ??? ??????. 3. -webkit-, -moz-, -ms-, -o- ? ?? ???? ???? ???? ?????. 4. AutoPrefixer? ???? ???? ???? ???? ?? ????. 5. ?? ????? ????? PostCSS? ???? BrowsersList? ??????. 6. ?? ? ???? ???? ?????. 7. Modernizr ?? ??? ??? ????? ??? ? ????. 8. ?? ????? ???? ?? ? ??? ????.

themaindifferencesbetweendisplay : ???, ??, andinline-blockinhtml/cssarelayoutbehavior, spaceusage ? stylingcontrol.1.inlineElementsFlowWithText, do n'tStartonnewlines, ingorewidth/height, andonlyapplyhorizontalpadding/margins —IdealforIneTeTexting

CSS? ?? ?? ??? ??? ??? ???? ???? SVG? ???? ?? ???, ?? ????, ??? ?? ?? ??? ?? ???? ??????. ??? ??? ????. 1. ?, ??, ??? ?? ?? ??? ?? ??? ?????. 2. ?? ?? ? ??? ???? ??? ? ????. 3. ?????? ?? ?? ?? ?? ????? ???? ?? ??? ?? ? ? ????. 4. ???? ???? ??? ??? ??? ????? ?? ? ??? ????. ???? ???? ?? ?? ?? : ? (50pxatcenter) ? ??? ?? ?? : ??? (50%0%, 100 0%, 0%)? ?? ????. ????

??? ?? ???? ???? ??? ??, ?? ??? ??? ? ? ????? ??? ??? ???? ???? ? ? ?? ? ? ????. 1. CSS ?? : ?? ??? ???? ???? ?? ??; 2. ????? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 3. ?? ??? ??? ??? ??? ?? ?? ???? ????????. 4. ??? ????? ??? ???? ?? ? ??? ??? ?? ??? ?? ?? ??? ????? ???? ?? ????.

CSS? ???? ?? ? ???? ???? ??? ?? ??? ?? ?? ?? ? ? ????. 1. Max width : 100% ? ?? : Auto? ???? ???? ??? ????? ???? ??? ??? ? ??????. 2. HTML? SRCSET ? ?? ??? ???? ?? ??? ??? ??? ??? ???????????. 3. ?? ?? ? ?? ??? ???? ??? ??? ? ?? ?????? ??????. ? ??? ?? ???? ?? ???? ???? ???? ????????.

CSS ??? ??? ?? ?? ?? ? ?? ? ?? ??? ?? ????. 1.px? ?? ??? ????? ?? ??? ??? ?? ??? ?????. 2.EM? ?? ????, ?? ?? ??? ??? ?? ?? ???? ??, REM? ?? ??? ???? ? ????? ??? ????? ?????. 3.VW/VH? ?? ? ???? ??? ??? ??? ??????? ?? ???? ?????? ???????. 4. ??? ?? ?? ? ??, ?? ?? ?? ? ??? ???? ???? ???????. ???? ??? ???? ??? ? ?? ??? ???? ? ????.

?? ????? CSS ?? ??? ????? ?? ?? ??? ??, ?? ?? ?? ??, Flexbox ? ??? ???? ?? ?? ? ?? CSS ??? ????? ??? ???? ???? ?? ????? ??? ?????. 1. ?? ??? ??? ???? ????. ???? CSSRESET ?? NALLER.CSS? ???? ?? ???? ???? ????. 2. IE? ?? ??? ?? ?? ?? ??? ????. ?? ?? : ?? ? ???? ??? ??? ???? ?? ????. 3. Flexbox ? Grid? Edge Case ?? Old ???? ??? ?????. ? ?? ??? ? AutopRefixer ??; 4. ?? CSS ?? ??? ???? ????. Caniuse? ???? ?? ?????????.
