!让页面的背景颜色变成透明的
有没有这种代码?
我只知道有flash透明
[此贴子已经被作者于2006-3-22 14:11:09编辑过]
!让页面的背景颜色变成透明的
有没有这种代码?
我只知道有flash透明
[此贴子已经被作者于2006-3-22 14:11:09编辑过]
頁麵透明代碼
<style>
td {filter: alpha(opacity=90)}
</style>
(紅色裏麵是透明度的設置,100為不透明,自己設自己閤適頁麵的透明度)
这个代码网上找的,但不能用,文字变透明了,但是页面不是。我用的是框架所以用透明
不用它没办法调用啊!
要用JS 然后加<iframe></iframe>
代码:js:
var delta=0.15
var collection;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</DIV>');
var newItem = {};
newItem.object = document.getElementById(id);
newItem.x = x;
newItem.y = y;
this.items[this.items.length] = newItem;
}
this.play = function()
{
collection = this.items
setInterval('play()',10);
}
}
function play()
{
for(var i=0;i<collection.length;i++)
{
var followObj = collection[i].object;
var followObj_x = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
var followObj_y = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
followObj.style.left=followObj.offsetLeft+dx;
}
if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
followObj.style.top=followObj.offsetTop+dy;
}
followObj.style.display = '';
}
}
var theFloaters = new floaters();
theFloaters.addItem('followDiv2',12,230,'<iframe name=xx src=XXXXXXXXXXXXXXXXXXXXXXXXXXX.htm marginwidth=1 marginheight=1 width=118 height="180" scrolling="no" border="0" frameborder="0"></iframe> </a><a href=javascript:window.opener=null;window.close()><strong><font color="#000000">关闭</font></strong></a> ');
theFloaters.play();
需要调用 XXXXXXXXXXXXXXXXXXXXXXXXXXX.htm 页面的内容!!!
[此贴子已经被作者于2006-3-22 10:04:32编辑过]