在网上查找到了一个实现文字无缝向上滚动效果的源码,结果发现运行有问题,于是就稍加改动,实现了js无缝向上滚动的效果. <script> window.onload = roll(50); function roll(t) { var ul1 = document.getElementById("ul1"); var ul2 = document.getElementById("ul2"); var box = document.getElementByI…
//鼠标移入移出动画 解决页面闪屏问题 window.onload = function () { var el = document.createElement('div'); el.className = "bg"; var obj_lis = document.getElementsByTagName('a'); for (i = 0; i < obj_lis.length; i++) { obj_lis[i].onmouseover = function (ev) { v…
<!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> <title> New Document </ti…
var u = navigator.userAgent; //Android终端 var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //iOS终端 var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); 1.. isAndroid和isiOS是两个布尔值 //判断设备是安卓或者是ios var ua = navigator.userAgent;…