???? ??? ??? ?? ?????. ??? Google ??? ???? ??? ????? ??? ? ?? ??? ??? ? ???? ???? ?? ??? ? ?? ??? ?? ???? ?????.
TL;DR
?? ? ??? ??? ?? ?? ???? ???? ??????.
HTML
??? ?????. ??:
- ???? ??? ?? #map(?? ??? ??).
- ??? ??? ??? #??? ????.
- ??? ??? ???? ?? #pegman ?? ?????.
<div> <h2> CSS </h2> <p>Positioning everything is simple, as you can see in the source code above, but the most important part is the rotate property. This is dynamically updated using JavaScript:<br> </p> <pre class="brush:php;toolbar:false">#pegman { /* other styles */ rotate: var(--r); }
?? ?? ??? ????? ?? ???? ?? ???? ??? ??? ???????.
??????
??? ?? ?? ??? ????? ???? ??????. JavaScript ??:
- ??? ???? ?????.
- ???? ??? ??? ???? ???????.
- ? ?? UX? ?? ???? ?????? ?????.
const pegman = document.querySelector('#pegman'); let isDragging = false; let initialX = 0; let initialY = 0; let inactivityTimeout; let lastX = 0; const timeout = 25; const maxDegrees = 50; // Event listeners pegman.addEventListener('mousedown', onMouseDown); document.addEventListener('mousemove', onMouseMove); document.addEventListener('mouseup', onMouseUp);
? ??? ???? ?????.
onMouseDown
?? ??? ??? ???? isDragged ???? ???? ???? ?????.
const onMouseDown = (e) => { isDragging = true; initialX = e.clientX; initialY = e.clientY; };
onMouseMove
??? ? ???? ???? ??? ?????. ??? ?????:
- ??? ?? ?? ??? ?????(???? ????? ??? ???? ??? ??? ??).
- ?? ?? --r? ???? ???? ???????.
const onMouseMove = (e) => { if (!isDragging) return; const dy = e.clientY - initialY; const dx = e.clientX - initialX; // Limit rotation range let rx = Math.max(-maxDegrees, Math.min(maxDegrees, dx - lastX)); pegman.setAttribute('style', `--r: ${rx}deg`); // Animate Pegman's position pegman.animate({ translate: `${dx}px ${dy}px` }, { duration: 100, fill: 'forwards', }); // Reset rotation after inactivity clearTimeout(inactivityTimeout); inactivityTimeout = setTimeout(() => { lastX = dx; pegman.setAttribute('style', `--r: 0deg`); }, timeout); };
onMouseUp
???? ???? ???? Pegman? ??? ??????.
- ??? 0?? ??????.
- ???? ???? ?? ??? ?????.
const onMouseUp = () => { isDragging = false; // Reset rotation pegman.setAttribute('style', `--r: 0`); // Animate Pegman back to its original position pegman.animate({ translate: `0px 0px` }, { duration: 500, fill: 'forwards', easing: 'ease', }); // Clear residual state inactivityTimeout = setTimeout(() => { lastX = 0; }, timeout); };
?? ??
? ???? ??? ?????? ????? ??? ???? ??? ??? ??? ? ??? ?????. ?? ??:
- CSS ??? ?? ??(?: --r)? ???? ???? ???? ???? ???? ?? ? ? ????.
- ?? ??? ??? ?? ??? ???? ????? ??? ?????.
- ????? ????? ??? ??? ???? ?????.
CodePen? ???? ???? ???? ???? ??? ?????! ???
???...
???? ?? ??? ? ? ?? Google? ?? ?????? ???? ????.
- ??? ??
- ?? ??
- ??? ??
????? ? ?? ??? ??? ??? ?? ????? ?????!
??? ??: ??? ??? ??? Joulupukki?? ?? ??? ????? ???
? ??? Google ???? ???? ???? ???? ??? ?? ?????. ??? ??? 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? ???? ?? ?????????.
