js+css实现文字从左侧弹出特效

3周前 (04-26 20:01)阅读17回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4494
  • 级别管理员
  • 主题898
  • 回复2
楼主

js+css实现整行文字从页面左侧逐行弹出显示效果,常用的文字弹出特效,可根据自己的需求来自定义弹出速度。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>js+css实现文字从左侧弹出特效_武鸣人</title>
<style type="text/css">
.wwwwumingren{
position: relative;
left: -500px;
}
</style>
<script type="text/javascript">
var pausebetweenmsg=10
var glidespeed=50
var curobjindex=0
function actualstyle(el, cssproperty){
if (el.currentStyle)
return el.currentStyle[cssproperty]
else if (window.getComputedStyle){
var elstyle=window.getComputedStyle(el, "")
return elstyle.getPropertyValue(cssproperty)
}
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function collectElementbyClass(){
var classname="wwwwumingren"
glidearray=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
glidearray[inc++]=alltags[i]
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
if (glidearray.length>0)
onebyoneglide()
}
function onebyoneglide(){
if (curobjindex<glidearray.length)
glidetimer=setInterval("glideroutine()",50)
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function glideroutine(){
if (parseInt(actualstyle(glidearray[curobjindex], "left"))<0)
glidearray[curobjindex].style.left=parseInt(actualstyle(glidearray[curobjindex], "left"))+50
else{
glidearray[curobjindex].style.left=0
curobjindex++
clearInterval(glidetimer)
setTimeout("onebyoneglide()", pausebetweenmsg)
}
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
if (window.addEventListener)
window.addEventListener("load", collectElementbyClass, false)
else if (window.attachEvent)
window.attachEvent("onload", collectElementbyClass)
else if (document.getElementById)
window.onload=collectElementbyClass
</script>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div class="wwwwumingren">倒数第7秒</div>
<div class="wwwwumingren">倒数第6秒</div>
<div class="wwwwumingren">倒数第5秒</div>
<div class="wwwwumingren">倒数第4秒</div>
<div class="wwwwumingren">倒数第3秒</div>
<div class="wwwwumingren">倒数第2秒</div>
<div class="wwwwumingren">倒数第1秒</div>
<p class="wwwwumingren">武鸣人,各种信息免费发布,资源共享合作共赢!</p>
</body>
</html>


0
0
收藏0
回帖

js+css实现文字从左侧弹出特效 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息