웹 프론트엔드 H5 튜토리얼 HTML5 Javascript API 확장 4에 대한 Raid - 드래그/드롭 개요_html5 튜토리얼 팁

HTML5 Javascript API 확장 4에 대한 Raid - 드래그/드롭 개요_html5 튜토리얼 팁

May 16, 2016 pm 03:49 PM
drop 견인

드래그/드롭은 매우 일반적인 기능입니다. 개체를 잡고 배치하려는 영역으로 끌 수 있습니다. 많은 자바스크립트는 jQueryUI의 드래그 앤 드롭 구성 요소와 같은 유사한 기능을 구현합니다. HTML5에서는 드래그 앤 드롭이 표준 작업이 되었으며 모든 요소에서 지원됩니다. 이 기능은 매우 일반적이기 때문에 모든 주요 브라우저에서 이 작업을 지원합니다.
드래그 가능 속성 활성화
아래와 같이 요소의 드래그 속성을 드래그 가능으로 변경하기만 하면 됩니다.

코드 복사
코드는 다음과 같습니다.


드래그하는 동안 데이터 전송
드래그하는 동안 변환 프로세스를 완료하기 위해 해당 논리 데이터를 전송해야 하는 경우가 많습니다. 여기서는 주로 dataTransfer 개체를 사용합니다. 데이터 전송을 위해 해당 멤버를 살펴보겠습니다.
메서드 멤버:

코드 복사
코드는 다음과 같습니다.

setData(format,data): 드래그한 데이터를 dataTransfer 개체에 할당합니다.

형식: 드래그되는 데이터 유형을 지정하는 문자열 매개변수. 이 매개변수의 값은 "Text"(텍스트 유형) 및 "URL"(URL 유형)일 수 있습니다. 이 매개변수는 대소문자 독립적이므로 "text"와 "Text"를 전달하는 것은 동일합니다.
data: 드래그된 데이터를 지정하는 변형 유형 매개변수입니다. 데이터는 텍스트, 이미지 경로, URL 등이 될 수 있습니다.
이 함수에는 부울 반환 값이 있습니다. true는 데이터가 dataTransfer에 성공적으로 추가되었음을 의미하고 false는 실패를 의미합니다. 필요한 경우 이 매개변수를 사용하여 특정 논리를 계속 실행해야 하는지 여부를 결정할 수 있습니다.

코드 복사
코드는 다음과 같습니다.

getData(format): Get dataTransfer 드래그 데이터에 저장된 데이터.

format의 의미는 setData와 동일하며 값은 "Text"(텍스트 유형) 및 "URL"(URL 유형)일 수 있습니다.

코드 복사
코드는 다음과 같습니다.

clearData(형식): 제거 지정된 유형 데이터.

위에서 지정할 수 있는 "텍스트"(텍스트 유형) 및 "URL"(URL 유형) 외에도 여기서 형식은 다음 값을 사용할 수도 있습니다: 파일-파일, html- html 요소, 이미지 -그림.
이 방법을 사용하면 드래그된 데이터 유형을 선택적으로 처리할 수 있습니다.
속성 멤버:

코드 복사
코드는 다음과 같습니다.

effectAllowed: 데이터 소스 요소의 데이터로 수행할 수 있는 작업을 설정하거나 가져옵니다.

속성 유형은 문자열이며, 값 범위는
"복사"-데이터 복사
"링크"-링크
"이동"-입니다. 데이터 이동
"copyLink"-대상 개체에 따라 결정되는 데이터를 복사하거나 연결합니다.
"copyMove"-대상 개체에 따라 결정되는 데이터를 복사하거나 이동합니다.
"linkMove" - ​​​​대상 개체에 따라 데이터를 연결하거나 이동합니다.
"all" - 모든 작업이 지원됩니다.
"없음"-드래그를 비활성화합니다.
"초기화되지 않음" - 기본값, 기본 동작을 채택합니다.
effectAllowed를 없음으로 설정한 후에는 드래그가 금지되지만 마우스 모양은 여전히 ​​드래그 가능한 개체의 모양을 표시합니다. 이 마우스 모양을 표시하지 않으려면 창 이벤트 이벤트의 returnValue 속성을 설정해야 합니다. 거짓으로.

코드 복사
코드는 다음과 같습니다.

dropEffect: 설정 또는 가져오기 드래그 대상 및 관련 마우스 모양에 허용되는 작업입니다.

속성 종류는 문자열이며, 값의 범위는 다음과 같습니다:
"복사" - 복사할 때 마우스가 모양으로 표시됩니다.
"링크" - 마우스가 나타납니다. 연결된 모양으로 표시됩니다.
"move" - ​​마우스가 움직이는 모양으로 나타납니다.
"none"(기본값) - 마우스가 드래그하지 않고 모양으로 나타납니다.
effectAllowed는 데이터 소스에서 지원하는 작업을 지정하므로 일반적으로 ondragstart 이벤트에 지정됩니다. dropEffect는 드래그 앤 드롭 대상에서 지원되는 작업을 지정하므로 effectAllowed와 함께 일반적으로 드래그 대상의 ondragenter, ondragover 및 ondrop 이벤트에 사용됩니다.

코드 복사
코드는 다음과 같습니다.

파일 목록을 반환합니다. 파일을 FileList로 드래그했습니다.
유형: ondragstart에서 전송된 데이터(드래그된 데이터) 유형 목록입니다.

dataTransfer 객체가 존재하면 드래그된 데이터 소스와 대상 요소 간에 논리적 데이터 전송이 가능해집니다. 일반적으로 setData 메소드를 사용하여 데이터 소스 요소의 ondragstart 이벤트에 데이터를 제공한 다음 getData 메소드를 사용하여 대상 요소의 데이터를 가져옵니다.
드래그 중에 발생하는 이벤트
다음은 드래그 중에 발생하는 이벤트입니다. 기본적으로 이벤트가 발생하는 순서는 다음과 같습니다.

코드 복사
코드는 다음과 같습니다.

dragstart: 드래그할 요소가 드래그되기 시작할 때 발생하는 이벤트입니다. 개체는 드래그 앤 드롭 요소입니다.
드래그: 요소가 드래그될 때 트리거됩니다. 이 이벤트 개체는 드래그된 요소입니다.
dragenter: 드래그 요소가 대상 요소에 들어갈 때 트리거됩니다. 이 이벤트 개체는 대상 요소입니다.
dragover: 대상 요소에서 요소를 드래그하여 이동할 때 트리거됩니다. 이 이벤트 객체는 대상 요소입니다.
dragleave: 요소가 대상 요소에서 멀리 드래그될 때 트리거됩니다. 이 이벤트 개체는 대상 요소입니다.
drop: 드래그된 요소가 대상 요소 내에 배치될 때 트리거됩니다. 이 이벤트 개체는 대상 요소입니다.
dragend: 드롭 후 트리거됩니다. 즉, 드래그가 완료되면 트리거됩니다. 이 이벤트 객체는 드래그된 요소입니다.

기본적으로 이벤트의 이벤트 매개변수는 관련 요소에 전달되며 쉽게 수정할 수 있습니다. 여기서는 모든 이벤트를 처리할 필요가 없으며 일반적으로 메인 이벤트만 연결하면 됩니다.
드래그 시작-드래그 시작 이벤트
이 이벤트에서 전달된 매개변수에는 드래그된 요소(event.Target)를 쉽게 얻을 수 있는 매우 풍부한 정보가 포함되어 있습니다. (event.dataTransfer.setData); 드래그 뒤에 있는 논리를 쉽게 구현할 수 있습니다(물론 바인딩할 때 다른 매개변수를 전달할 수도 있습니다).
드래그 프로세스 중 - ondrag, ondragover, ondragenter 및 ondragleave 이벤트
ondrag 이벤트의 개체는 드래그된 요소이며 일반적으로 이 이벤트는 덜 자주 처리됩니다. ondragenter 이벤트는 드래그가 현재 요소에 들어갈 때 발생하고, ondragleave 이벤트는 드래그가 현재 요소를 떠날 때 발생하며, ondragover 이벤트는 드래그가 현재 요소 내에서 이동할 때 발생합니다.
여기서 한 가지만 주의하면 됩니다. 기본적으로 브라우저는 요소 삭제를 금지하므로 요소 삭제를 허용하려면 이 함수에서 false를 반환하거나 event.preventDefault를 호출해야 합니다. () 방법. 아래 예와 같습니다.
Drag end-ondrop, ondragend 이벤트
드래그 가능한 데이터를 드롭하면 드롭 이벤트가 발생합니다. 드롭이 완료된 후 dragend 이벤트가 발생하는데, 이 이벤트는 비교적 거의 사용되지 않습니다.
간단한 예를 보세요:

코드 복사
코드는 다음과 같습니다.



PreventDefault();
}
functiondrag(ev){
ev.dataTransfer.setData("Text",ev.target.id)
}
functiondrop(ev){
vardata=ev .dataTransfer.getData("Text");
ev.target.appendChild(document.getElementById(data));
ev.preventDefault()}




< ;imgid="drag1"src="img_logo.gif"draggable="true"ondragstart="drag(event)"width="336"height="69"/>
;

파일 드래그
위의 예에서는 dataTransfer의 다양한 방법과 속성을 사용했습니다. 인터넷의 또 다른 흥미로운 애플리케이션을 살펴보겠습니다. 이미지를 웹 페이지에 드래그 앤 드롭한 다음 표시합니다. 웹 페이지. 이 애플리케이션은 dataTransfer의 파일 속성을 사용합니다.

코드 복사
코드는 다음과 같습니다.

🎜>< ;html>


HTML5 드래그 앤 드롭 파일<br><style> <br> #section{font-family:"조지아","Microsoft Yahei","中文中宋";} <br>.container{display:inline-block;min-height:200px;min-width:360px; 색상: #f30;패딩:30px;테두리:3pxsolid#ddd;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;} <br>.preview{최대 너비: 360px; } <br>#files-list{position:absolute;top:0;left:500px;} <br>#list{width:460px;} <br>#list.preview{max-width:250px;} <br>#listp{color:#888;font-size:12px;} <br>#list.green{color:#09c;} <br></style> <br></head> >< ;body> <br><divid="section"> <br><p>이미지를 아래 컨테이너로 드래그하세요. </p> <br><divid="container" class= " 컨테이너"> <br></div> <br><divid="files-list"> <br><p>드래그된 파일: </p> <br>< ; ulid="list"></ul> <br></div> <br><script>if(window.FileReader){ <br> = document.getElementById('list'), <br>cnt=document.getElementById('container'); <br>//이미지인지 확인 <br>functionisImage(type){ <br>switch(type) { <br> 케이스'이미지/jpeg': <br>케이스'이미지/png': <br>케이스'이미지/gif': <br>케이스'이미지/bmp': <br>케이스'이미지/jpg' : <br> returntrue; <br>default: <br>returnfalse; <br>} <br>} <br>//드래그 앤 드롭 파일 목록 처리<br>functionhandleFileSelect(evt){ <br>evt.stopPropagation (); <br> evt.preventDefault(); <br>varfiles=evt.dataTransfer.files <br>for(vari=0,f;f=files[i];i ){ <br>vart=f .type?f.type :'n/a', <br>reader=newFileReader(), <br>looks=function(f,img){ <br>list.innerHTML ='<li><strong> ' f.name '&lt ;/strong>(' t <br>')-' f.size 'bytes<p>' '</p></li>' <br>cnt.innerHTML= img <br>} , <br>isImg=isImage(t), <br>img <br>//처리된 이미지 <br>if(isImg){ <br>reader.onload=(function(theFile) { <br>반환 함수(e){ <br>img='<imgclass="preview"src="' e.target.result '"title="' theFile.name '"/>' <br> Looks(theFile,img ); <br>}; <br>})(f) <br>reader.readAsDataURL(f) <br>}else{ <br>img='"o((>Ω< ))o", 보내주신 내용은 사진이 아닙니다! ! '; <br />looks(f,img); <br />} <br />} <br />} <br />//삽입 및 드래그 효과 처리<br />functionhandleDragEnter(evt){this.setAttribute('style' , 'border-style:dashed;');} <br />functionhandleDragLeave(evt){this.setAttribute('style','');} <br />//브라우저 기본 이벤트가 <br />functionhandleDragOver(evt){ <br />evt.stopPropagation(); <br />evt.preventDefault() <br />} <br />cnt.addEventListener('dragenter',handleDragEnter,false); 🎜>cnt.addEventListener('dragover',handleDragOver,false); <br />cnt.addEventListener('drop',handleFileSelect,false) <br />cnt.addEventListener('dragleave',handleDragLeave,false); }else{ <br />document.getElementById('section').innerHTML='학생 여러분의 브라우저는 그것을 지원하지 않습니다.' <br />} <br /></script> <br></body> ></html> <br><br><br>이 예제에서는 html5의 파일 읽기 API를 사용합니다. FileReader 개체는 파일 읽기를 위한 다음과 같은 비동기 메서드를 제공합니다. <br>1. <br>바이너리 모드에서 파일을 읽으면 결과 속성에 파일의 바이너리 형식이 포함됩니다.<br>2.FileReader.readAsText(fileBlob,opt_encoding) <br>텍스트 모드에서 파일을 읽으면 결과 속성에 다음이 포함됩니다. 파일의 텍스트 형식이며 기본 디코딩 매개변수는 "utf-8"입니다. <br>3.FileReader.readAsDataURL(file) </div>URL 형식의 파일을 읽은 결과에는 파일의 DataURL 형식이 포함됩니다(그림은 일반적으로 이런 방식으로 사용됩니다). <br>위 방법으로 파일을 읽으면 다음 이벤트가 발생합니다. <br><br><br><br><br><br>코드 복사 <br><br><br> 코드는 다음과 같습니다: <div class="msgheader"><div class="right"> <span style="CURSOR: pointer" onclick="copycode(getid('phpcode171'));">onloadstart, onprogress, onabort, onerror, onload, onloadend <u></u><br>이 이벤트는 매우 간단합니다. 필요할 때 연결하기만 하면 됩니다. 아래 코드 예시를 보세요. <br><br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode172'));"><u> 코드를 복사하세요. </u></span></div>코드는 다음과 같습니다. </div> <div class="msgborder" id="phpcode172"> <br>functionstartRead() { <br>//obtaininputelementthroughDOM <br>varfile=document.getElementById('file').files[0]; <br>if(file){ <br>getAsText(file) <br> } <br>} <br>functiongetAsText(readFile){ <br>varreader=newFileReader(); <br>//ReadfileintomemoryasUTF-16 <br>reader.readAsText(readFile,"UTF-16")/ /Handleprogress,success, anderrors <br>reader.onprogress=updateProgress; <br>reader.onload=loaded; <br>reader.onerror=errorHandler; <br>} <br>functionupdateProgress(evt){ <br>if( evt.lengthComputable){ <br>//evt.loadedandevt.totalareProgressEventproperties <br>varloaded=(evt.loaded/evt.total); <br>if(loaded<1){ <br>//Increasetheprogbarlength <br>/ /style.width= (loaded*200) "px"; <br>} <br>} <br>} <br>functionloaded(evt){ <br>//Obtainthereadfiledata <br>varfileString=evt.target.result ; <br>/ /HandleUTF-16filedump <br>if(utils.regexp.is중국어(fileString)){ <br>//중국어 문자 이름 유효성 검사 <br>} <br>else{ <br>//runothercharsettest <br>} <br>// xhr.send(fileString) <br>} <br>functionerrorHandler(evt){ <br>if(evt.target.error.name=="NotReadableErr"){ <br>//파일을 읽을 수 없음 <br>} <br> } <br><br> </div>간략한 설명: 일반 파일 다운로드에서는 window.open 메서드를 사용합니다. 예: <br><br><br><div class="msgheader"><div class="right"> <span style="CURSOR: pointer" onclick="copycode(getid('phpcode173'));">코드 복사 <u></u></span>코드는 다음과 같습니다.</div></div> <div class="msgborder" id="phpcode173">window.open('http://aaa.bbbb.com/ccc.rar','_blank' ) <br><br> </div> <br><strong>실용 참고 자료: <font color="#0000ff"><br></font>공식 문서: </strong>http://www.w3schools.com/html5/<a href="http://www.w3schools.com/html5/"></a>좋은 튜토리얼 웹사이트: http://html5.phphubei.com/html5/features/DrapAndDrop/<br>MSDN 도움말: <br>http://msdn.microsoft.com/en-us/library/ms535861( v=vs.85 ).aspx<a href="http://msdn.microsoft.com/en-us/library/ms535861(v=vs.85).aspx"></a>파일 드래그 앤 드롭 세부정보:<br>http://www.html5rocks.com/zh/tutorials/file/dndfiles/<a href="http://www.html5rocks.com/zh/tutorials/file/dndfiles/"></a>파일 드래그 앤 드롭 드롭 및 업로드:<br>http://www.chinaz.com/design/2010/0909/131984.shtml<a href="http://www.chinaz.com/design/2010/0909/131984.shtml"></a>파일 드래그 앤 드롭 업로드의 전체 예:<br>http://www. cnblogs.com/liaofeng/archive/ 2011/05/18/2049928.html<a href="http://www.cnblogs.com/liaofeng/archive/2011/05/18/2049928.html"></a>파일 다운로드 예:<br>http://hi.baidu.com/guo_biru/item/2d7201c012b6debd0c0a7b05<a href="http://hi.baidu.com/guo_biru/item/2d7201c012b6debd0c0a7b05"></a>window.open 전략:<br>http://www.cnblogs.com/liulf/archive/2010/03/01/1675511.html<a href="http://www.cnblogs.com/liulf/archive/2010/03/01/1675511.html"></a>window.open 매개변수: <br>http:/ /www.koyoz.com/blog /?action=show&id=176<a href="http://www.koyoz.com/blog/?action=show&id=176"></a></span> </div></div> </div> </div> </div> <div class="wzconShengming_sp"> <div class="bzsmdiv_sp">본 웹사이트의 성명</div> <div>본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.</div> </div> </div> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="2507867629"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <div class="AI_ToolDetails_main4sR"> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5902227090019525" data-ad-slot="3653428331" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <!-- <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796784440.html" title="<s> : 데드 레일 - 모든 도전을 완료하는 방법" class="phpgenera_Details_mainR4_bottom_title"><s> : 데드 레일 - 모든 도전을 완료하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> --> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>핫 AI 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411540686492.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undresser.AI Undress" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undresserai-undress" title="Undresser.AI Undress" class="phpmain_tab2_mids_title"> <h3>Undresser.AI Undress</h3> </a> <p>사실적인 누드 사진을 만들기 위한 AI 기반 앱</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411552797167.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="AI Clothes Remover" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/ai-clothes-remover" title="AI Clothes Remover" class="phpmain_tab2_mids_title"> <h3>AI Clothes Remover</h3> </a> <p>사진에서 옷을 제거하는 온라인 AI 도구입니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173410641626608.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Undress AI Tool" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/undress-ai-tool" title="Undress AI Tool" class="phpmain_tab2_mids_title"> <h3>Undress AI Tool</h3> </a> <p>무료로 이미지를 벗다</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173411529149311.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Clothoff.io" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/clothoffio" title="Clothoff.io" class="phpmain_tab2_mids_title"> <h3>Clothoff.io</h3> </a> <p>AI 옷 제거제</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/ai_manual/001/246/273/173414504068133.jpg?x-oss-process=image/resize,m_fill,h_50,w_50" src="/static/imghw/default1.png" alt="Video Face Swap" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/ai/video-swap" title="Video Face Swap" class="phpmain_tab2_mids_title"> <h3>Video Face Swap</h3> </a> <p>완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>인기 기사</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785841.html" title="어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 그림자 : 조개 수수께끼 솔루션</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796789525.html" title="Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법" class="phpgenera_Details_mainR4_bottom_title">Windows 11 KB5054979의 새로운 기능 및 업데이트 문제를 해결하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>2 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796785857.html" title="Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다" class="phpgenera_Details_mainR4_bottom_title">Atomfall에서 크레인 제어 키 카드를 찾을 수 있습니다</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796783009.html" title="어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법" class="phpgenera_Details_mainR4_bottom_title">어 ass 신 크리드 섀도우 - 대장장이를 찾고 무기 및 갑옷 커스터마 화 잠금 해제 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>1 몇 달 전</span> <span>By DDD</span> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/1796784440.html" title="<s> : 데드 레일 - 모든 도전을 완료하는 방법" class="phpgenera_Details_mainR4_bottom_title"><s> : 데드 레일 - 모든 도전을 완료하는 방법</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <span>3 몇 주 전</span> <span>By DDD</span> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/article.html">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR3"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hottools2.png" alt="" /> <h2>뜨거운 도구</h2> </div> <div class="phpgenera_Details_mainR3_bottom"> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab96f0f39f7357.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="메모장++7.3.1" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/92" title="메모장++7.3.1" class="phpmain_tab2_mids_title"> <h3>메모장++7.3.1</h3> </a> <p>사용하기 쉬운 무료 코드 편집기</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97a3baad9677.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 중국어 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/93" title="SublimeText3 중국어 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 중국어 버전</h3> </a> <p>중국어 버전, 사용하기 매우 쉽습니다.</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58ab97ecd1ab2670.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="스튜디오 13.0.1 보내기" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/121" title="스튜디오 13.0.1 보내기" class="phpmain_tab2_mids_title"> <h3>스튜디오 13.0.1 보내기</h3> </a> <p>강력한 PHP 통합 개발 환경</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d0e0fc74683535.jpg?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="드림위버 CS6" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/469" title="드림위버 CS6" class="phpmain_tab2_mids_title"> <h3>드림위버 CS6</h3> </a> <p>시각적 웹 개발 도구</p> </div> </div> <div class="phpmain_tab2_mids_top"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_top_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" class="lazy" data-src="https://img.php.cn/upload/manual/000/000/001/58d34035e2757995.png?x-oss-process=image/resize,m_fill,h_50,w_72" src="/static/imghw/default1.png" alt="SublimeText3 Mac 버전" /> </a> <div class="phpmain_tab2_mids_info"> <a href="https://www.php.cn/ko/toolset/development-tools/500" title="SublimeText3 Mac 버전" class="phpmain_tab2_mids_title"> <h3>SublimeText3 Mac 버전</h3> </a> <p>신 수준의 코드 편집 소프트웨어(SublimeText3)</p> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/ai">더보기</a> </div> </div> </div> <div class="phpgenera_Details_mainR4"> <div class="phpmain1_4R_readrank"> <div class="phpmain1_4R_readrank_top"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/hotarticle2.png" alt="" /> <h2>뜨거운 주제</h2> </div> <div class="phpgenera_Details_mainR4_bottom"> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/gmailyxdlrkzn" title="Gmail 이메일의 로그인 입구는 어디에 있나요?" class="phpgenera_Details_mainR4_bottom_title">Gmail 이메일의 로그인 입구는 어디에 있나요?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>7615</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>15</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/cakephp-tutor" title="Cakephp 튜토리얼" class="phpgenera_Details_mainR4_bottom_title">Cakephp 튜토리얼</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>1387</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>52</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/steamdzhmcssmgs" title="Steam의 계정 이름 형식은 무엇입니까?" class="phpgenera_Details_mainR4_bottom_title">Steam의 계정 이름 형식은 무엇입니까?</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>88</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>11</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/winactivationkeyper" title="Win11 활성화 키 영구" class="phpgenera_Details_mainR4_bottom_title">Win11 활성화 키 영구</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>68</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>19</span> </div> </div> </div> <div class="phpgenera_Details_mainR4_bottoms"> <a href="https://www.php.cn/ko/faq/newyorktimesdailybrief" title="NYT 연결 힌트와 답변" class="phpgenera_Details_mainR4_bottom_title">NYT 연결 힌트와 답변</a> <div class="phpgenera_Details_mainR4_bottoms_info"> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/eyess.png" alt="" /> <span>29</span> </div> <div class="phpgenera_Details_mainR4_bottoms_infos"> <img src="/static/imghw/tiezi.png" alt="" /> <span>136</span> </div> </div> </div> </div> <div class="phpgenera_Details_mainR3_more"> <a href="https://www.php.cn/ko/faq/zt">더보기</a> </div> </div> </div> </div> </div> <div class="Article_Details_main2"> <div class="phpgenera_Details_mainL4"> <div class="phpmain1_2_top"> <a href="javascript:void(0);" class="phpmain1_2_top_title">Related knowledge<img src="/static/imghw/index2_title2.png" alt="" /></a> </div> <div class="phpgenera_Details_mainL4_info"> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/622866.html" title="JavaScript를 사용하여 이미지의 드래그 및 확대/축소 기능을 구현하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/169837076051918.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="JavaScript를 사용하여 이미지의 드래그 및 확대/축소 기능을 구현하는 방법은 무엇입니까?" /> </a> <a href="https://www.php.cn/ko/faq/622866.html" title="JavaScript를 사용하여 이미지의 드래그 및 확대/축소 기능을 구현하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_title">JavaScript를 사용하여 이미지의 드래그 및 확대/축소 기능을 구현하는 방법은 무엇입니까?</a> <span class="Articlelist_txts_time">Oct 27, 2023 am 09:39 AM</span> <p class="Articlelist_txts_p">JavaScript를 사용하여 이미지의 드래그 및 확대/축소 기능을 구현하는 방법은 무엇입니까? 최신 웹 개발에서는 이미지 드래그 및 확대/축소가 일반적인 요구 사항입니다. JavaScript를 사용하면 이미지에 드래그 및 확대/축소 기능을 쉽게 추가하여 더 나은 사용자 경험을 제공할 수 있습니다. 이 기사에서는 구체적인 코드 예제와 함께 JavaScript를 사용하여 이 기능을 구현하는 방법을 소개합니다. HTML 구조 먼저, 그림을 표시하고 추가하려면 기본 HTML 구조가 필요합니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/620313.html" title="uniapp에서 드래그 앤 드롭 정렬 및 드래그 앤 드롭 작업을 구현하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/169767957274657.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="uniapp에서 드래그 앤 드롭 정렬 및 드래그 앤 드롭 작업을 구현하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/620313.html" title="uniapp에서 드래그 앤 드롭 정렬 및 드래그 앤 드롭 작업을 구현하는 방법" class="phphistorical_Version2_mids_title">uniapp에서 드래그 앤 드롭 정렬 및 드래그 앤 드롭 작업을 구현하는 방법</a> <span class="Articlelist_txts_time">Oct 19, 2023 am 09:39 AM</span> <p class="Articlelist_txts_p">Uniapp은 크로스 플랫폼 개발 프레임워크로, 강력한 크로스 엔드 기능을 통해 개발자는 다양한 애플리케이션을 빠르고 쉽게 개발할 수 있습니다. Uniapp에서는 드래그 앤 드롭 정렬과 드래그 앤 드롭 동작을 구현하는 것도 매우 간단하며, 다양한 컴포넌트와 요소의 드래그 앤 드롭 동작을 지원할 수 있습니다. 이 기사에서는 Uniapp을 사용하여 드래그 앤 드롭 정렬 및 드래그 앤 드롭 작업을 구현하는 방법을 소개하고 구체적인 코드 예제를 제공합니다. 드래그 앤 드롭 정렬 기능은 많은 응용 프로그램에서 매우 일반적입니다. 예를 들어 목록 드래그 앤 드롭 정렬, 아이콘 드래그 앤 드롭 정렬 등을 구현하는 데 사용할 수 있습니다. 아래에 우리가 나열</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/566662.html" title="Vue에서 드래그 앤 드롭 선택 및 배치에 대한 팁 및 모범 사례" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/168765922379009.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Vue에서 드래그 앤 드롭 선택 및 배치에 대한 팁 및 모범 사례" /> </a> <a href="https://www.php.cn/ko/faq/566662.html" title="Vue에서 드래그 앤 드롭 선택 및 배치에 대한 팁 및 모범 사례" class="phphistorical_Version2_mids_title">Vue에서 드래그 앤 드롭 선택 및 배치에 대한 팁 및 모범 사례</a> <span class="Articlelist_txts_time">Jun 25, 2023 am 10:13 AM</span> <p class="Articlelist_txts_p">Vue는 단일 페이지 애플리케이션(SPA)을 구축하는 데 적합한 널리 사용되는 JavaScript 프레임워크입니다. 지침과 구성 요소를 통해 드래그 앤 드롭 선택 및 배치 기능을 지원하여 사용자에게 더 나은 대화형 경험을 제공합니다. 이 기사에서는 Vue에서 드래그 앤 드롭 선택 및 배치에 대한 기술과 모범 사례를 소개합니다. 드래그 명령어 Vue는 드래그 효과를 쉽게 얻을 수 있는 v-드래그 가능한 명령어를 제공합니다. 이 명령은 모든 요소에 적용할 수 있으며 드래그 스타일을 사용자 정의할 수 있습니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/611573.html" title="Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/465/014/169519326911943.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법" /> </a> <a href="https://www.php.cn/ko/faq/611573.html" title="Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법" class="phphistorical_Version2_mids_title">Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법</a> <span class="Articlelist_txts_time">Sep 20, 2023 pm 03:01 PM</span> <p class="Articlelist_txts_p">Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법 Vue.js는 대화형 프런트 엔드 애플리케이션을 구축하는 데 도움이 되는 인기 있는 JavaScript 프레임워크입니다. Vue에서는 드래그 앤 드롭 정렬 효과를 쉽게 구현할 수 있어 사용자가 요소를 드래그하여 데이터를 정렬할 수 있습니다. 이 기사에서는 Vue를 사용하여 드래그 앤 드롭 정렬 효과를 구현하는 방법을 소개하고 구체적인 코드 예제를 제공합니다. 먼저 Vue 인스턴스를 생성하고 정렬할 데이터를 저장할 배열을 정의해야 합니다. 이 예에서 우리는</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/608702.html" title="Vue 실용적인 기술: v-on 명령을 사용하여 마우스 드래그 이벤트 처리" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/465/014/169473747188216.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Vue 실용적인 기술: v-on 명령을 사용하여 마우스 드래그 이벤트 처리" /> </a> <a href="https://www.php.cn/ko/faq/608702.html" title="Vue 실용적인 기술: v-on 명령을 사용하여 마우스 드래그 이벤트 처리" class="phphistorical_Version2_mids_title">Vue 실용적인 기술: v-on 명령을 사용하여 마우스 드래그 이벤트 처리</a> <span class="Articlelist_txts_time">Sep 15, 2023 am 08:24 AM</span> <p class="Articlelist_txts_p">Vue 실무 기술: v-on 명령을 사용하여 마우스 끌기 이벤트 처리 서문: Vue.js는 단순성, 사용 용이성 및 유연성으로 인해 많은 개발자가 가장 먼저 선택하는 JavaScript 프레임워크입니다. Vue 애플리케이션 개발에서 사용자 상호 작용 이벤트를 처리하는 것은 필수적인 기술입니다. 이 기사에서는 Vue의 v-on 지시문을 사용하여 마우스 드래그 이벤트를 처리하는 방법을 소개하고 구체적인 코드 예제를 제공합니다. Vue 인스턴스 만들기: 먼저 HTML 파일에 Vue.js 라이브러리 파일을 도입합니다. &</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/566475.html" title="Vue에서 드래그 앤 드롭 요소를 복사하고 이동하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/168765332334957.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="Vue에서 드래그 앤 드롭 요소를 복사하고 이동하는 방법은 무엇입니까?" /> </a> <a href="https://www.php.cn/ko/faq/566475.html" title="Vue에서 드래그 앤 드롭 요소를 복사하고 이동하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_title">Vue에서 드래그 앤 드롭 요소를 복사하고 이동하는 방법은 무엇입니까?</a> <span class="Articlelist_txts_time">Jun 25, 2023 am 08:35 AM</span> <p class="Articlelist_txts_p">Vue는 편리한 드래그 앤 드롭 기능을 제공하여 요소를 쉽게 복사하고 이동할 수 있는 인기 있는 JavaScript 프레임워크입니다. 다음으로 Vue에서 드래그 앤 드롭 요소를 복사하고 이동하는 방법을 살펴보겠습니다. 1. 드래그 앤 드롭 요소의 기본 구현 Vue에서 드래그 앤 드롭 요소를 복사하고 이동하려면 먼저 해당 요소의 기본 드래그 앤 드롭 기능을 구현해야 합니다. 구체적인 구현 방법은 다음과 같습니다. 템플릿에서 드래그해야 하는 요소를 추가합니다: &lt;divclass="drag-elem"</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/1796503192.html" title="거래 | Tesla Model 3 Long Range AWD는 $7,500의 세금 인센티브를 완전히 되찾고 $40,000 미만으로 떨어집니다." class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/465/014/171876216348085.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="거래 | Tesla Model 3 Long Range AWD는 $7,500의 세금 인센티브를 완전히 되찾고 $40,000 미만으로 떨어집니다." /> </a> <a href="https://www.php.cn/ko/faq/1796503192.html" title="거래 | Tesla Model 3 Long Range AWD는 $7,500의 세금 인센티브를 완전히 되찾고 $40,000 미만으로 떨어집니다." class="phphistorical_Version2_mids_title">거래 | Tesla Model 3 Long Range AWD는 $7,500의 세금 인센티브를 완전히 되찾고 $40,000 미만으로 떨어집니다.</a> <span class="Articlelist_txts_time">Jun 19, 2024 am 09:55 AM</span> <p class="Articlelist_txts_p">Tesla가 작년 말에 Model 3 Highland 리프레시를 출시한 직후, 미국 연방 EV 세금 인센티브 규칙이 변경되어 Tesla가 신형 M에 중국 LFP 셀을 사용했기 때문에 적격 구매자에 대한 잠재적 할인이 절반으로 줄었습니다.</p> </div> <div class="phphistorical_Version2_mids"> <a href="https://www.php.cn/ko/faq/621376.html" title="JavaScript를 사용하여 요소의 크기를 변경하기 위해 끌어서 놓기 기능을 구현하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_img"> <img onerror="this.onerror=''; this.src='/static/imghw/default1.png'" src="/static/imghw/default1.png" class="lazy" data-src="https://img.php.cn/upload/article/000/887/227/169785929787496.jpg?x-oss-process=image/resize,m_fill,h_207,w_330" alt="JavaScript를 사용하여 요소의 크기를 변경하기 위해 끌어서 놓기 기능을 구현하는 방법은 무엇입니까?" /> </a> <a href="https://www.php.cn/ko/faq/621376.html" title="JavaScript를 사용하여 요소의 크기를 변경하기 위해 끌어서 놓기 기능을 구현하는 방법은 무엇입니까?" class="phphistorical_Version2_mids_title">JavaScript를 사용하여 요소의 크기를 변경하기 위해 끌어서 놓기 기능을 구현하는 방법은 무엇입니까?</a> <span class="Articlelist_txts_time">Oct 21, 2023 am 11:34 AM</span> <p class="Articlelist_txts_p">JavaScript를 사용하여 요소의 크기를 변경하기 위해 끌어서 놓기 기능을 구현하는 방법은 무엇입니까? 웹 기술의 발전으로 인해 요소의 크기를 변경하기 위해 드래그 앤 드롭 기능을 갖춘 웹 페이지가 점점 더 많아지고 있습니다. 예를 들어 div 요소를 끌어서 크기를 조정하여 너비와 높이를 조정할 수 있습니다. 이 기사에서는 JavaScript를 사용하여 이 기능을 구현하는 방법을 소개하고 구체적인 코드 예제를 제공합니다. 시작하기 전에 요소의 위치 및 크기 속성과 같은 몇 가지 기본 개념을 이해해야 합니다. CSS에서 t까지</p> </div> </div> <a href="https://www.php.cn/ko/web-designer.html" class="phpgenera_Details_mainL4_botton"> <span>See all articles</span> <img src="/static/imghw/down_right.png" alt="" /> </a> </div> </div> </div> </main> <footer> <div class="footer"> <div class="footertop"> <img src="/static/imghw/logo.png" alt=""> <p>공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!</p> </div> <div class="footermid"> <a href="https://www.php.cn/ko/about/us.html">회사 소개</a> <a href="https://www.php.cn/ko/about/disclaimer.html">부인 성명</a> <a href="https://www.php.cn/ko/update/article_0_1.html">Sitemap</a> </div> <div class="footerbottom"> <p> © php.cn All rights reserved </p> </div> </div> </footer> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1745226114"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all' /> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function () { var u = "https://tongji.php.cn/"; _paq.push(['setTrackerUrl', u + 'matomo.php']); _paq.push(['setSiteId', '9']); var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0]; g.async = true; g.src = u + 'matomo.js'; s.parentNode.insertBefore(g, s); })(); </script> <script> // top layui.use(function () { var util = layui.util; util.fixbar({ on: { mouseenter: function (type) { layer.tips(type, this, { tips: 4, fixed: true, }); }, mouseleave: function (type) { layer.closeAll("tips"); }, }, }); }); document.addEventListener("DOMContentLoaded", (event) => { // 定义一个函数来处理滚动链接的点击事件 function setupScrollLink(scrollLinkId, targetElementId) { const scrollLink = document.getElementById(scrollLinkId); const targetElement = document.getElementById(targetElementId); if (scrollLink && targetElement) { scrollLink.addEventListener("click", (e) => { e.preventDefault(); // 阻止默认链接行为 targetElement.scrollIntoView({ behavior: "smooth" }); // 平滑滚动到目标元素 }); } else { console.warn( `Either scroll link with ID '${scrollLinkId}' or target element with ID '${targetElementId}' not found.` ); } } // 使用该函数设置多个滚动链接 setupScrollLink("Article_Details_main1L2s_1", "article_main_title1"); setupScrollLink("Article_Details_main1L2s_2", "article_main_title2"); setupScrollLink("Article_Details_main1L2s_3", "article_main_title3"); setupScrollLink("Article_Details_main1L2s_4", "article_main_title4"); setupScrollLink("Article_Details_main1L2s_5", "article_main_title5"); setupScrollLink("Article_Details_main1L2s_6", "article_main_title6"); // 可以继续添加更多的滚动链接设置 }); window.addEventListener("scroll", function () { var fixedElement = document.getElementById("Article_Details_main1Lmain"); var scrollTop = window.scrollY || document.documentElement.scrollTop; // 兼容不同浏览器 var clientHeight = window.innerHeight || document.documentElement.clientHeight; // 视口高度 var scrollHeight = document.documentElement.scrollHeight; // 页面总高度 // 计算距离底部的距离 var distanceToBottom = scrollHeight - scrollTop - clientHeight; // 当距离底部小于或等于300px时,取消固定定位 if (distanceToBottom <= 980) { fixedElement.classList.remove("Article_Details_main1Lmain"); fixedElement.classList.add("Article_Details_main1Lmain_relative"); } else { // 否则,保持固定定位 fixedElement.classList.remove("Article_Details_main1Lmain_relative"); fixedElement.classList.add("Article_Details_main1Lmain"); } }); </script> </body> </html>