찾다
웹 프론트엔드JS 튜토리얼아주 좋은 마우스 슬라이딩 그림 효과 Javascript CSS_image 특수 효과

내가 원하는 효과를 디자인하는 첫 번째 단계!
이전에 만들었던 사진첩 효과를 FW를 사용하여 변경하고(http://www.jb51.net/blogview.asp?logID=628) 간단한 렌더링을 디자인했습니다!

두 번째 단계는 레이아웃입니다!

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


이때 효과를 확인하실 수 있습니다:

[Ctrl A 모두 선택 참고: 외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다 ]

3단계, Javascript 디자인
코드 복사 코드는 다음과 같습니다.

<script> <BR>ScrollImg = function(imgBoxId){ <BR>this.imgBoxId = imgBoxId; //이미지의 가장 바깥쪽 DIV ID를 가져옵니다. . createTable(); //행 1개와 열 3개로 구성된 테이블 생성<BR>this.setSpan(); //이미지 뒤의 이미지에 ALT 파일 배치<BR>this.setOnclick(); 이벤트를 클릭하고 테이블에 내용을 넣으세요 <BR>this.$(this.imgBoxId).appendChild(this.table) //모두 완료<BR>} <BR><br>ScrollImg.prototype = { <br>$ :function(objId){ <BR>return document.getElementById(objId); <BR>}, <BR>$$:function(n){ <BR>return document.createElement(n)}, <BR> createTable:function(){ <BR>var table = this.$$('table') <BR>var tr = this.$$('tr') <BR>for(var k=0; k< 3; k ) tr.appendChild(this.$$('td')); <BR>var tbody = this.$$('tbody') <BR> table.appendChild(tbody); <BR>return table; <BR>}, <BR>setSpan:function(){ <BR>varlinks=this.$(this.imgBoxId).getElementsByTagName('a'); 🎜> for(var k=0; k<links.length; k ){ <BR>varspan = this.$$('span') <BR>span.appendChild(document.createTextNode(links[k]. getElementsByTagName( 'img')[0].alt)); <BR>links[k].appendChild(span); <BR>} <BR>return; <BR>}, <BR>setOnclick:function (){ <BR>var imgArray = ['left', ,'right']; <BR>var tds = this.table.getElementsByTagName('td') <BR>for(var k=0; k<tds.length; k ) { <BR>tds[k].setAttribute('vAlign', 'center') <BR>if(k == 1){ <BR>var div = this.$$('div') <BR> var ul = this.$(this.imgBoxId).getElementsByTagName('ul')[0]; <BR>div.appendChild(ul) <BR>tds[k].appendChild(div); 계속 <BR>} <BR><BR>var img = this.$$('img') <BR>img.setAttribute('src', 'http://www.jb51.net/attachments/month_0902/ ' imgArray [k] '.gif'); <BR>img.setAttribute('alt', imgArray[k]) <BR>img.style.cursor = '포인터' <br>img.onclick; ){ <br>var imgBox = this.parentNode.parentNode.getElementsByTagName('div')[0]; <BR>var ns = imgBox.scrollLeft; <BR>var tkey = 500>if(this.alt == '왼쪽'){ <BR>var left = setInterval(function(){ <BR>imgBox.scrollLeft = imgBox.scrollLeft - (tkey * 0.1); <BR>tkey = tkey * 0.9; <BR>if( tkey &lt ; 2)clearInterval(left); <BR>},50); <BR>} else { <BR>var right = setInterval(function (){ <BR>imgBox.scrollLeft (tkey * 0.1 ); <BR>tkey * 0.9; if(tkey < 2)clearInterval(right) <BR>} <BR>return; tds[ k].appendChild(img); <BR>} <BR>return; <BR>} <BR>} <BR><BR>var test = new ScrollImg('imgBox'); 스크립트> <BR><BR><BR>이때 효과를 살펴보겠습니다! <BR><div class="htmlarea"><TEXTAREA id="runcode68144"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>www.zishu.cn <body> <div id="imgBox"> <ul> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 001" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 002" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 003" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546145.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 004" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546693.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 005" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546360.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 006" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 007" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 008" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 009" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546145.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 010" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546693.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 011" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546360.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 012" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 013" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 014" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 015" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 001" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 002" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 003" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546145.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 004" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546693.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 005" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546360.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 006" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 007" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 008" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 009" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546145.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 010" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546693.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 011" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546360.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 012" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546382.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 013" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546959.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 014" /> <li><a href="http://www.jb51.net"><img src="/static/imghwm/default1.png" data-src="http://files.jb51.net/upload/20090404034546983.gif?x-oss-process=image/resize,p_40" class="lazy" alt="this is 015" /> </script>
성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
Python vs. JavaScript : 학습 곡선 및 사용 편의성Python vs. JavaScript : 학습 곡선 및 사용 편의성Apr 16, 2025 am 12:12 AM

Python은 부드러운 학습 곡선과 간결한 구문으로 초보자에게 더 적합합니다. JavaScript는 가파른 학습 곡선과 유연한 구문으로 프론트 엔드 개발에 적합합니다. 1. Python Syntax는 직관적이며 데이터 과학 및 백엔드 개발에 적합합니다. 2. JavaScript는 유연하며 프론트 엔드 및 서버 측 프로그래밍에서 널리 사용됩니다.

Python vs. JavaScript : 커뮤니티, 라이브러리 및 리소스Python vs. JavaScript : 커뮤니티, 라이브러리 및 리소스Apr 15, 2025 am 12:16 AM

Python과 JavaScript는 커뮤니티, 라이브러리 및 리소스 측면에서 고유 한 장점과 단점이 있습니다. 1) Python 커뮤니티는 친절하고 초보자에게 적합하지만 프론트 엔드 개발 리소스는 JavaScript만큼 풍부하지 않습니다. 2) Python은 데이터 과학 및 기계 학습 라이브러리에서 강력하며 JavaScript는 프론트 엔드 개발 라이브러리 및 프레임 워크에서 더 좋습니다. 3) 둘 다 풍부한 학습 리소스를 가지고 있지만 Python은 공식 문서로 시작하는 데 적합하지만 JavaScript는 MDNWebDocs에서 더 좋습니다. 선택은 프로젝트 요구와 개인적인 이익을 기반으로해야합니다.

C/C에서 JavaScript까지 : 모든 것이 어떻게 작동하는지C/C에서 JavaScript까지 : 모든 것이 어떻게 작동하는지Apr 14, 2025 am 12:05 AM

C/C에서 JavaScript로 전환하려면 동적 타이핑, 쓰레기 수집 및 비동기 프로그래밍으로 적응해야합니다. 1) C/C는 수동 메모리 관리가 필요한 정적으로 입력 한 언어이며 JavaScript는 동적으로 입력하고 쓰레기 수집이 자동으로 처리됩니다. 2) C/C를 기계 코드로 컴파일 해야하는 반면 JavaScript는 해석 된 언어입니다. 3) JavaScript는 폐쇄, 프로토 타입 체인 및 약속과 같은 개념을 소개하여 유연성과 비동기 프로그래밍 기능을 향상시킵니다.

JavaScript 엔진 : 구현 비교JavaScript 엔진 : 구현 비교Apr 13, 2025 am 12:05 AM

각각의 엔진의 구현 원리 및 최적화 전략이 다르기 때문에 JavaScript 엔진은 JavaScript 코드를 구문 분석하고 실행할 때 다른 영향을 미칩니다. 1. 어휘 분석 : 소스 코드를 어휘 단위로 변환합니다. 2. 문법 분석 : 추상 구문 트리를 생성합니다. 3. 최적화 및 컴파일 : JIT 컴파일러를 통해 기계 코드를 생성합니다. 4. 실행 : 기계 코드를 실행하십시오. V8 엔진은 즉각적인 컴파일 및 숨겨진 클래스를 통해 최적화하여 Spidermonkey는 유형 추론 시스템을 사용하여 동일한 코드에서 성능이 다른 성능을 제공합니다.

브라우저 너머 : 실제 세계의 JavaScript브라우저 너머 : 실제 세계의 JavaScriptApr 12, 2025 am 12:06 AM

실제 세계에서 JavaScript의 응용 프로그램에는 서버 측 프로그래밍, 모바일 애플리케이션 개발 및 사물 인터넷 제어가 포함됩니다. 1. 서버 측 프로그래밍은 Node.js를 통해 실현되며 동시 요청 처리에 적합합니다. 2. 모바일 애플리케이션 개발은 재교육을 통해 수행되며 크로스 플랫폼 배포를 지원합니다. 3. Johnny-Five 라이브러리를 통한 IoT 장치 제어에 사용되며 하드웨어 상호 작용에 적합합니다.

Next.js (백엔드 통합)로 멀티 테넌트 SAAS 애플리케이션 구축Next.js (백엔드 통합)로 멀티 테넌트 SAAS 애플리케이션 구축Apr 11, 2025 am 08:23 AM

일상적인 기술 도구를 사용하여 기능적 다중 테넌트 SaaS 응용 프로그램 (Edtech 앱)을 구축했으며 동일한 작업을 수행 할 수 있습니다. 먼저, 다중 테넌트 SaaS 응용 프로그램은 무엇입니까? 멀티 테넌트 SAAS 응용 프로그램은 노래에서 여러 고객에게 서비스를 제공 할 수 있습니다.

Next.js (Frontend Integration)를 사용하여 멀티 테넌트 SaaS 응용 프로그램을 구축하는 방법Next.js (Frontend Integration)를 사용하여 멀티 테넌트 SaaS 응용 프로그램을 구축하는 방법Apr 11, 2025 am 08:22 AM

이 기사에서는 Contrim에 의해 확보 된 백엔드와의 프론트 엔드 통합을 보여 주며 Next.js를 사용하여 기능적인 Edtech SaaS 응용 프로그램을 구축합니다. Frontend는 UI 가시성을 제어하기 위해 사용자 권한을 가져오고 API가 역할 기반을 준수하도록합니다.

JavaScript : 웹 언어의 다양성 탐색JavaScript : 웹 언어의 다양성 탐색Apr 11, 2025 am 12:01 AM

JavaScript는 현대 웹 개발의 핵심 언어이며 다양성과 유연성에 널리 사용됩니다. 1) 프론트 엔드 개발 : DOM 운영 및 최신 프레임 워크 (예 : React, Vue.js, Angular)를 통해 동적 웹 페이지 및 단일 페이지 응용 프로그램을 구축합니다. 2) 서버 측 개발 : Node.js는 비 차단 I/O 모델을 사용하여 높은 동시성 및 실시간 응용 프로그램을 처리합니다. 3) 모바일 및 데스크탑 애플리케이션 개발 : 크로스 플랫폼 개발은 개발 효율을 향상시키기 위해 반응 및 전자를 통해 실현됩니다.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
4 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
4 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
4 몇 주 전By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 채팅 명령 및 사용 방법
4 몇 주 전By尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

에디트플러스 중국어 크랙 버전

에디트플러스 중국어 크랙 버전

작은 크기, 구문 강조, 코드 프롬프트 기능을 지원하지 않음

맨티스BT

맨티스BT

Mantis는 제품 결함 추적을 돕기 위해 설계된 배포하기 쉬운 웹 기반 결함 추적 도구입니다. PHP, MySQL 및 웹 서버가 필요합니다. 데모 및 호스팅 서비스를 확인해 보세요.

DVWA

DVWA

DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

Eclipse용 SAP NetWeaver 서버 어댑터

Eclipse용 SAP NetWeaver 서버 어댑터

Eclipse를 SAP NetWeaver 애플리케이션 서버와 통합합니다.

Atom Editor Mac 버전 다운로드

Atom Editor Mac 버전 다운로드

가장 인기 있는 오픈 소스 편집기