Nov
23
这个标题有些噱头,据我目前所能查到的资料显示,真正用flash作为网页的背景是现时不能实现的,呵呵。
现在一般只是用图片作为网页背景,再在图片特定的区域之上建一个透明flash文件,达到类似flash网页背景的效果(这个效果的插入代码请自行搜索);
如果是在一段文字之下做背景呢?
请看本blog模板(http://www.couke.com/weblog/index.php?tem=Return)侧边栏日历版块的flash效果,看起来flash是在日历文字的下面作为背景。当然,如上所说,真正用flash作为网页的背景是现时不能实现的。其实它是建了一个层,而本质上这个flash层是建立在整个日历版块的其它层之上,又因为flash是透明的,同时对flash停放的位置进行了定位,所以像是flash在这段日历文字的下面,看上去像是flash做网页背景。
代码如下:
<div id="Layer1" style="position:absolute; left:720; top:400; width:180; height:180; z-index:1">
<div align="center">
<embed src="template/Return/images/flash_bg.swf" width="180" height="180" wmode="transparent"></embed>
</div>
</div>
把上面这段代码插入到网页需要的位置。这段代码可以建立在整个网页的最上层,也可以建立在某个版块的最上层,然后对flash进行定位,把flash文件置于设定的区域之上,达到预想效果~
代码详解:
left:720; //距离整个网页左边720个像素
top:400; //距离整个网页顶部400个像素
width:180; //flash文件的宽度
height:180 //flash文件的高度
<embed src="template/Return/images/flash_bg.swf"... //flash文件的连接地址
现在一般只是用图片作为网页背景,再在图片特定的区域之上建一个透明flash文件,达到类似flash网页背景的效果(这个效果的插入代码请自行搜索);
如果是在一段文字之下做背景呢?
请看本blog模板(http://www.couke.com/weblog/index.php?tem=Return)侧边栏日历版块的flash效果,看起来flash是在日历文字的下面作为背景。当然,如上所说,真正用flash作为网页的背景是现时不能实现的。其实它是建了一个层,而本质上这个flash层是建立在整个日历版块的其它层之上,又因为flash是透明的,同时对flash停放的位置进行了定位,所以像是flash在这段日历文字的下面,看上去像是flash做网页背景。
代码如下:
<div id="Layer1" style="position:absolute; left:720; top:400; width:180; height:180; z-index:1">
<div align="center">
<embed src="template/Return/images/flash_bg.swf" width="180" height="180" wmode="transparent"></embed>
</div>
</div>
把上面这段代码插入到网页需要的位置。这段代码可以建立在整个网页的最上层,也可以建立在某个版块的最上层,然后对flash进行定位,把flash文件置于设定的区域之上,达到预想效果~
代码详解:
left:720; //距离整个网页左边720个像素
top:400; //距离整个网页顶部400个像素
width:180; //flash文件的宽度
height:180 //flash文件的高度
<embed src="template/Return/images/flash_bg.swf"... //flash文件的连接地址
小小黑客
Web配色方案




$elements['sideblock_calendar']=<<<eot
<div id='panelCalendar' class="panel">
<h5 style="cursor: pointer" onclick='showhidediv("sideblock_announcement");'>{title}</h5>
<div class="panel-content" id="sideblock_calendar" style="display: {ifextend}">
<div id="Layer1" style="position:absolute; left:720; top:400; width:180; height:180; z-index:1">
<div align="center">
<embed src="template/Return/images/flash_bg.swf" width="180" height="180" wmode="transparent"></embed>
</div>
</div>
{content}
</div>
</div>
eot;