实用公告栏文字文本框内定时切换效果

2周前 (05-07 14:23)阅读11回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4714
  • 级别管理员
  • 主题942
  • 回复2
楼主

漂亮js文字定时切换特效,几组文字切换带幻灯片切换显示效果,非常实用的一款文字定时切换显示特效,结合自己网站稍作修改即可。

<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>
<style type="text/css">
#memoryticker{
background-color: lightyellow;
width: 450px;
font: bold 12px Verdana;
/*Tip: add in height attribute here for multiple line scroller*/
border: 1px solid black;
padding: 3px;
/*Change 0.7 below to a different number if desired (0.7=0.7 seconds)*/
/*Remove below line to remove transitional effect in IE. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0 Duration=0.7)
}
</style>
<script type="text/javascript">
//configure tickercontents[] to set the messges you wish be displayed (HTML codes accepted)
//Backslash any apostrophes within your text (ie: I\'m the king of the world!)
var tickercontents=new Array()
tickercontents[0]='最新资源:<a href="https://www.wuming.ren">武鸣人</a>-各种信息免费发布,资源共享合作共赢!1111'
tickercontents[1]='最新资源:<a href="https://www.wuming.ren">武鸣人</a>-各种信息免费发布,资源共享合作共赢!2222'
tickercontents[2]='最新资源:<a href="https://www.wuming.ren">武鸣人</a>-各种信息免费发布,资源共享合作共赢!3333'
tickercontents[3]='最新资源:<a href="https://www.wuming.ren">武鸣人</a>-各种信息免费发布,资源共享合作共赢!4444'
var persistlastviewedmsg=1 //should messages' order persist after users navigate away (1=yes, 0=no)?
var persistmsgbehavior="onload" //set to "onload" or "onclick".
//configure the below variable to determine the delay between ticking of messages (in miliseconds):
var tickdelay=3000
////Do not edit pass this line////////////////
var divonclick=(persistlastviewedmsg && persistmsgbehavior=="onclick")? 'onClick="msg_wwwwumingren()" ' : ''
var currentmessage=0
function chage_www_wuming_ren(){
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Apply()
crosstick.innerHTML=tickercontents[currentmessage]
if (crosstick.filters && crosstick.filters.length>0)
crosstick.filters[0].Play()
currentmessage=(currentmessage==tickercontents.length-1)? currentmessage=0 : currentmessage+1
var filterduration=(crosstick.filters&&crosstick.filters.length>0)? crosstick.filters[0].duration*1000 : 0
setTimeout("chage_www_wuming_ren()",tickdelay+filterduration)
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function beginticker(){
if (persistlastviewedmsg && get_cookie("lastmsgnum")!="")
revivelastmsg()
crosstick=document.getElementById? document.getElementById("memoryticker") : document.all.memoryticker
chage_www_wuming_ren()
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
}
return returnvalue;
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
function msg_wwwwumingren(){
document.cookie="lastmsgnum="+currentmessage
}
function revivelastmsg(){
currentmessage=parseInt(get_cookie("lastmsgnum"))
currentmessage=(currentmessage==0)? tickercontents.length-1 : currentmessage-1
}//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)
if (persistlastviewedmsg && persistmsgbehavior=="onload")
window.onunload=msg_wwwwumingren
if (document.all||document.getElementById)
document.write('<div id="memoryticker" '+divonclick+'></div>')
if (window.addEventListener)
window.addEventListener("load", beginticker, false)
else if (window.attachEvent)
window.attachEvent("onload", beginticker)
else if (document.all || document.getElementById)
window.onload=beginticker
</script>


0
0
收藏0
回帖

实用公告栏文字文本框内定时切换效果 期待您的回复!

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

取消确定

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