惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
N
News and Events Feed by Topic
P
Privacy International News Feed
Apple Machine Learning Research
Apple Machine Learning Research
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
GbyAI
GbyAI
The Hacker News
The Hacker News
K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
C
Cyber Attacks, Cyber Crime and Cyber Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
A
About on SuperTechFans
S
Secure Thoughts
G
Google Developers Blog
博客园 - 司徒正美
Forbes - Security
Forbes - Security
T
The Exploit Database - CXSecurity.com
Latest news
Latest news
V2EX - 技术
V2EX - 技术
I
InfoQ
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Security Latest
Security Latest
AI
AI
T
Tailwind CSS Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cloudbric
Cloudbric
V
Vulnerabilities – Threatpost
Schneier on Security
Schneier on Security
P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Schneier on Security
博客园 - 【当耐特】
NISL@THU
NISL@THU
Y
Y Combinator Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
Lohrmann on Cybersecurity
Help Net Security
Help Net Security
The Cloudflare Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - Leon0812

Export csv Export Excel Jquery pluign development example XML Mail Template Management Resource file management Excel Reader iframe 中显示内嵌页的局部 - Leon0812 - 博客园 easyslider - Leon0812 - 博客园 缩放页面字体 可编辑DIV - Leon0812 - 博客园 vs快捷键大全(转) SQL文件執行 利用IHttpModule、IHttpHandler做授权类 - Leon0812 - 博客园 C#调用非托管的DLL 获取-编译-打包 VS作业一条龙批处理 Reporting Service for SQL 2008匿名访问报表方法 獲取控件位置 - Leon0812 - 博客园 Installscript中修改web.config - Leon0812 - 博客园 publish
无缝滚动 - Leon0812 - 博客园
Leon0812 · 2010-01-30 · via 博客园 - Leon0812

无缝滚动

Posted on 2010-01-30 10:30  Leon0812  阅读(186)  评论()    收藏  举报

  • <div id=demo style="overflow:hidden;height:100;width:240;background:#4183B1;color:#ffffff"><div id=demo1>这里放置要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容要滚动的内容</div>
  • <div id=demo2></div>
  • </div>
  • <script>
  • var speed=30
  • demo2.innerHTML=demo1.innerHTML//克隆demo1为demo2
  • function Marquee(){
  • if(demo2.offsetTop-demo.scrollTop<=0)//当滚动至demo1demo2交界时
  • demo.scrollTop-=demo1.offsetHeight//demo跳到最顶端
  • else{
  • demo.scrollTop++
  • }
  • }
  • var MyMar=setInterval(Marquee,speed)//设置定时器
  • demo.onmouseover=function() {clearInterval(MyMar)}//鼠标移上时清除定时器达到滚动停止的目的
  • demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}//鼠标移开时重设定时器
  • </script>