? ????? Prism.js ??? ??? ? ?? ?? ??? ???? Next.js ???? ???? ??? ?????. ?? ??? ?? The remark-prism
???? ? ?? ??? ?? CSS/JavaScript? ?????.
Next.js ???? ????? ?? ?? ?? ? ??? ?????. ? ???? PRISM.JS ? The remark-prism
????? ???? ?? ?? ??, ? ?? ? ?? ? ?????? ???? ??? ?????. ?? ??? ???? ?????? ??? ???? ?????.
?? ?? :
? ???? Next.js ??? ???? ????? ??? ?? ??? ??? ?????. ???? ???? ?????? .js :
NPM ?? ?? ??????
?? Prism.js ?? :
markdownToHtml
???? remark-prism
??????? (????? /lib
? ??) :
"??"?? {??} ?? ??; "warch-html"?? html ?? ??; "??-???"?? ?? ??; ???? ?? ??? ?? MarkdownToHtml (Markdown) { const result = await ? () .use (html, {sanitize : false}) .use (wartingprism, {???? : [ "line-numbers"]}) .Process (Markdown); return result.toString (); }
??? ?? remark-html
??? ???? ? ?? ????. pages/_app.js
:
"Prismjs/Themes/Prism-Tomorrow.css"??; "prismjs/????/??-???/??? ??-??? (CSS) ??; "../styles/prism-overrides.css";
??? ???? ?? prism-overrides.css
????.
? ?? ?? :
line-numbers
????? ???? ??? ?? CSS? ??????? ( remark-prism
readme? ??). prism-overrides.css
?? ?? ?? ??? ??? ? ????.
.line-numbers span.line-numbers-rows { ?? -? : -1px; }
?? ?? :
PRISM.JS ?? ????? ????? ?? ??? ?? ???? ?? remark-prism
? ?? ???? ????. ?? ??? CSS ? JavaScript? ?????. ? CSS? prism-overrides.css
? ??????.
: ?? { -????? ? : RGB (0 0 / 0); -Highlight width : 0; } .line-numbers span.line-numbers-rows> span { ?? : ??; } .line-numbers span.line-numbers-rows> span :: ?? { ???: " "; ?? : var (-????? ? ????); ?? : var (-????? width); ?? : ??; ?? : 0; }
?? ??? data-line
??? ??????<pre class="brush:php;toolbar:false"></pre>
?? (? : [data-line="3,8-10"]
). components/post-body.tsx
?? javaScript? ????? (??, ??? ??) :
"React"?? {useEffect, useref} import; // ... const rootref = useref (null); useeffect (() => { // ... (?? ??<pre class="brush:php;toolbar:false"> ??? ?? ??? ???? ?? ? ????? ??) ... }, []); // ... (??? ?? ??? ???? ???? ????? ????? ?? ??) ...
???? data-line
??? ?? ???? ?? ?? ?????<pre class="brush:php;toolbar:false"> ??? ?? ? CSS ??? ?? ??? ???? ???? ??? ?? ?? ?????.</pre>
? ????? ? ?? ?? :
? ??? ???? ?? ?? ????? .hide-numbers
??? ? CSS ??? ???? ?????? ????? ? ??? ?????.
??-?? ?? ?? :
?? ? ??? ????? ??? ??????. components/post-body.tsx
?? ??? ??? ??????<pre class="brush:php;toolbar:false"> <code>navigator.clipboard.writeText</code> ? ???? <code>createCopyButton</code> ??? ???? ??. CSS? ???? ??? ????????.</pre>
? ??? ? ???? Prism.js? Next.js ???? ???? ?? ? ?? ??????? ?????? ??? ???? ?????. ?? ? ??? ?? ???? ??? ???????.
? ??? ?? ???? ?????? ?? ????? (? ? ??!)? ?? ?????. ??? ??? 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? ???? ?? ?????????.
