<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}
h1,h2,h3,h4,h5,h6{font-size:100%;}
ol,ul{list-style:none;}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
caption,th{text-align:left;}
q:before,q:after{content:'';}
body { font-size: 12px; font-family: Verdana, "宋体", Dotum; line-height: 1.5em; }
a:link { color: #333; text-decoration: none;}
a:visited { color: #333; text-decoration: none; }
a:hover { color: #000; text-decoration: none; }
a:active { color: #000; text-decoration: none; }
body { margin: 200px;}
#visualAd, #visualAd ul { position: relative; }
#preview, #info, #playIcon { position: absolute; }
#visualAd {
width: 698px;
height: 312px;
border: 1px solid #eee;
background-color: #efefef;
}
#visualAd ul {
z-index: 100;
height: 300px;
float: right;
text-indent: 25px;
margin: 5px;
margin-top: 7px;
}
#visualAd ul li {
float: right;
clear: both;
width: 205px;
height: 50px;
}
#visualAd ul a {
display: block;
height: 50px;
background: transparent url(images/bar.png) no-repeat 0 -50px;
color: #666;
cursor: pointer;
text-shadow: 1px 1px 0 #eee;
}
#visualAd ul a:hover, #visualAd ul a.on {
background: transparent url(images/bar.png) no-repeat 0 0;
color: white;
text-shadow: 1px 1px 0 #666;
}
#visualAd ul a img {
height: 286px;
display: none;
}
#visualAd ul li a strong {
padding-top: 8px;
font-weight: bold;
font-size: 1.2em;
}
#visualAd ul li a strong, #visualAd ul li a span {
display: block;
height: 1.3em;
line-height: 1.3em;
}
#preview {
margin: 6px;
width: 686px;
height: 300px;
z-index: 10;
cursor: pointer;
border: 1px solid #ccc;
background-color: white;
overflow: hidden;
}
#previewImg {
position: relative;
left: 0;
width: 1020px;
overflow: hidden;
}
#previewImg img { float: left; width: 510px;}
#info {
bottom: 0;
height: 60px;
width: 480px;
background-color: black;
margin-left: 10px;
margin-bottom: 15px;
color: white;
opacity: 0.3;
border-radius : 5px;
box-shadow: 0 0 5px #fff;
filter: alpha(opacity=30);
}
#msg {
position: absolute;
bottom: 0;
margin-bottom: 25px;
margin-left: 10px;
text-shadow: 1px 1px 0 #333;
}
#msg p {
text-indent: 5em;
margin-top: 6px;
color: white;
}
#msg p strong {
font-weight: bold;
font-size: 1.2em;
}
#playIcon {
top: 10px;
left: 8px;
width: 41px;
height: 41px;
background: transparent url(./images/playIcon.png) no-repeat 0 0;
}
#playIcon.on { background-position: 0 -41px; }
#controlIcon {
position: absolute;
bottom:0;
left: 0;
z-index: 1000;
width: 80px;
height: 20px;
background-color: #efefef;
}
#controlIcon span {
display: block;
float: left;
line-height: 20px;
height: 20px;
}
#controlLeft, #controlRight{
width: 8px;
}
.left {
background: transparent url(./images/controlIcon.png) no-repeat -12px center;
margin-left: 8px;
}
.right {
background: transparent url(./images/controlIcon.png) no-repeat -20px center;
margin-left: 8px;
margin-right: 8px;
}
._left {
background: transparent url(./images/controlIconOver.png) no-repeat -12px center;
margin-left: 8px;
cursor: pointer;
}
._right {
background: transparent url(./images/controlIconOver.png) no-repeat -20px center;
margin-left: 8px;
margin-right: 8px;
cursor: pointer;
}
#controlStatus {
width: 6px;
height: 20px;
margin-left: 8px;
cursor: pointer;
}
._on {background: transparent url(./images/controlIconOver.png) no-repeat 0 center;}
._off {background: transparent url(./images/controlIcon.png) no-repeat -6px center;}
#curIndex{ color: #F07D0D; font-weight: bold; }
</style>
<script type="text/javascript">
function id(id) { return document.getElementById(id); }
function createTag(tag) { return document.createElement(tag);}
function createText(text) { return document.createTextNode(text); }
function next(elem) {
do {
elem = elem.nextSibling;
}
while(elem && elem.nodeType != 1);
return elem;
}
function prev(elem) {
do {
elem = elem.prevousSibling;
} while(elem && elem.nodeType != 1);
return elem;
}
function first(elem) {
elem = elem.firstChild
return elem && elem.nodeType != 1 ? next(elem) : elem;
}
function last(elem) {
elem = elem.lastChild
return elem && elem.nodeType != 1 ? prev(elem) : elem;
}
function parent(elem, num) {
num = num || 1;
for (var i=0; i<num; i++) {
if (elem != null) {
elem = elem.parentNode;
}
}
return elem;
}
function getStyle(elem, name) {
// if property has in style object so return
if (elem.style[name]) {
return elem.style[name];
// IE
} else if (elem.currentStyle) {
return elem.currentStyle[name];
// W3C
} else if (document.defaultView && document.defaultView.getComputedStyle) {
name = name.replace(/([A-Z])/g, "-$1");
name = name.toLowerCase();
var s = document.defaultView.getComputedStyle(elem, "");
return s && s.getPropertyValue(name);
} else {
return null;
}
}
function hide(elem) {
var curDisplay = getStyle(elem, 'display');
if (curDisplay != 'none') {
elem.$oldDisplay = curDisplay;
}
elem.style.display = 'none';
}
function show(elem) {
elem.style.display = elem.$oldDisplay || '';
}
function setOpacity(elem, level) {
if (elem.filters) {
elem.style.filters = 'alpha(opacity=' + level + ')';
} else {
elem.style.opacity = level/100;
}
}
function winOpen() {
var len = arguments.length;
var url, urlName, urlParam;
switch(len) {
case 1:
url = arguments[0];
urlName = '';
urlParam = '';
break;
case 2:
url = arguments[0];
urlName = arguments[1];
urlParam = '';
break;
case 3:
url = arguments[0];
urlName = arguments[1];
urlParam = arguments[2];
break;
default:
url = false;
break;
}
if (url) { window.open(url, urlName, urlParam);}
else { exeMsg("请传递URL地址") };
}
function exeMsg(text) {
var div = createTag('div');
div.setAttribute('id', 'exeResult');
var closeDiv = createTag('div');
closeDiv.style.backgroundColor = "#000";
closeDiv.style.fontFamily = "Verdana";
closeDiv.style.fontWeight = "bold";
closeDiv.style.color = "white";
closeDiv.style.textAlign = "center";
closeDiv.style.width = "1.4em";
closeDiv.style.height = "1.4em";
closeDiv.style.position = "absolute";
closeDiv.style.right = "3px";
closeDiv.style.top = "3px";
closeDiv.style.border = "1px solid #efefef";
closeDiv.style.cursor = "pointer";
closeDiv.style.borderRadius = "3px";
closeDiv.onclick = function() { document.body.removeChild(id('exeResult'));}
closeDiv.appendChild(createText('X'));
div.appendChild(closeDiv);
div.style.padding = "10px 30px 10px 10px";
div.style.border = "1px solid #F9592B";
div.style.backgroundColor = "#F8EEC2";
div.style.color = "#FD6102";
div.style.position = "absolute";
div.style.top = "2px";
di
没有合适的资源?快使用搜索试试~ 我知道了~
Js|JavaScript 广告滚动显示源代码
共18个文件
jpg:9个
png:5个
html:2个
5星 · 超过95%的资源 需积分: 12 17 下载量 59 浏览量
2011-09-17
18:20:23
上传
评论
收藏 516KB ZIP 举报
温馨提示
这个例子以最基础的面向过程式编写的广告自动滚动播放的源代码。可以直接使用实践项目中。
资源推荐
资源详情
资源评论
收起资源包目录
ad.zip (18个子文件)
ad
images
01.jpg 38KB
05.jpg 54KB
playicon.png 2KB
04.jpg 24KB
thumb02.jpg 5KB
bar.psd 24KB
bar.png 1KB
3.jpg 248KB
thumb13.jpg 5KB
bar1.png 1KB
Thumbs.db 43KB
03.jpg 23KB
06.jpg 49KB
02.jpg 25KB
controlIcon.png 736B
controlIconOver.png 724B
ad_opacity.html 20KB
ad_horizontal.html 22KB
共 18 条
- 1
资源评论
- jianzheng192013-10-23不错,还很全面
- cherish01252013-10-18做的非常漂亮
- benyatou20122013-06-05很好用,。。
空道仙
- 粉丝: 20
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功