求html 素材...

求html 素材...,第1张

你算是找对人了

1、背景(下雨的,将下列代码放入<body>中即可,很漂亮喔)

<script language="JavaScript">

<!--

var no = 50

var speed = 1

var ns4up = (document.layers) ? 1 : 0

var ie4up = (document.all) ? 1 : 0

var s, x, y, sn, cs

var a, r, cx, cy

var i, doc_width = 800, doc_height = 600

if (ns4up) {

doc_width = self.innerWidth

doc_height = self.innerHeight

}

else

if (ie4up) {

doc_width = document.body.clientWidth

doc_height = document.body.clientHeight

}

x = new Array()

y = new Array()

r = new Array()

cx = new Array()

cy = new Array()

s = 8

for (i = 0i <no++ i) {

initRain()

if (ns4up) {

if (i == 0) {

document.write("<layer name=\"dot"+ i +"\" left=\"1\" ")

document.write("top=\"1\" visibility=\"show\"><font color=\"grade\">")

document.write("/</font></layer>")

}

else {

document.write("<layer name=\"dot"+ i +"\" left=\"1\" ")

document.write("top=\"1\" visibility=\"show\"><font color=\"grade\">")

document.write("/</font></layer>")

}

}

else

if (ie4up) {

if (i == 0) {

document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ")

document.write("absoluteZ-INDEX: "+ i +"VISIBILITY: ")

document.write("visibleTOP: 15pxLEFT: 15px\"><font color=\"grade\">")

document.write("/</font></div>")

}

else {

document.write("<div id=\"dot"+ i +"\" style=\"POSITION: ")

document.write("absoluteZ-INDEX: "+ i +"VISIBILITY: ")

document.write("visibleTOP: 15pxLEFT: 15px\"><font color=\"grade\">")

document.write("/</font></div>")

}

}

}

function initRain() {

a = 6

r[i] = 1

sn = Math.sin(a)

cs = Math.cos(a)

cx[i] = Math.random() * doc_width + 1

cy[i] = Math.random() * doc_height + 1

x[i] = r[i] * sn + cx[i]

y[i] = cy[i]

}

function makeRain() {

r[i] = 1

cx[i] = Math.random() * doc_width + 1

cy[i] = 1

x[i] = r[i] * sn + cx[i]

y[i] = r[i] * cs + cy[i]

}

function updateRain() {

r[i] += s

x[i] = r[i] * sn + cx[i]

y[i] = r[i] * cs + cy[i]

}

function raindropNS() {

for (i = 0i <no++ i) {

updateRain()

if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {

makeRain()

doc_width = self.innerWidth

doc_height = self.innerHeight

}

document.layers["dot"+i].top = y[i]

document.layers["dot"+i].left = x[i]

}

setTimeout("raindropNS()", speed)

}

function raindropIE() {

for (i = 0i <no++ i) {

updateRain()

if ((x[i] <= 1) || (x[i] >= (doc_width - 20)) || (y[i] >= (doc_height - 20))) {

makeRain()

doc_width = document.body.clientWidth

doc_height = document.body.clientHeight

}

document.all["dot"+i].style.pixelTop = y[i]

document.all["dot"+i].style.pixelLeft = x[i]

}

setTimeout("raindropIE()", speed)

}

if (ns4up) {

raindropNS()

}

else

if (ie4up) {

raindropIE()

}

-->

</script>

2、视频或音乐播放器(<body>中,如果是视频,要WMV格式的)

<embed src="周杰伦 - 跨时代.mp3" autostart="true" loop="infinite" width="400" height="300">

背景音乐:<bgsound src="周杰伦 - 跨时代.mp3" loop="2">

3、链接<a>原本是有下划线的 你是不是要 一开始没有下划线 鼠标放上去显示下划线 字体还变会色呢?在</head>下加入

<style>

a{text-decoration:nonefont-size:14px}

a:hover{text-decoration:underlinecolor:#00FFFF}

</style>

//字体大小font-size、color 自己调喔

1、修改部分如下:

<html>

 <head>

  <script src="http://www.ren3.cn/Snow Demo/jsized.snow.min.js" type="text/javascript"></script>        

<script>

    /**

     * This function takes 2 arguments

     * First is the path to the directory with snowflake images

     * Second is the maximum number of snowflakes, please do not

     * set this number above 60 as it will impact the performance

     */

    createSnow("", 60)//目录改为当前目录

</script>

 </head>

 <body>

  测试

 </body>

</html>

2、在该网页目录 下 新添加 四张雪花图片 命名规则(snow0.gif snow1.gif snow2.gif snow3.gif)

1、在Photoshop中开一张有雪景的图像,当然不是雪景也没有关系,只是如果图片上本来就有点雪会更有气氛。

2、将背景图层进行复制,执行“滤镜>像素化>点状化”命令,在d出的“点状化”对话框中设定如下图所示。在这里“单元格大小”的设定决定了雪片的大小。

3、单击“确定”按钮,得到结果如下图所示。

4、 执行“图像>调整>阈值”命令,在“阈值”对话框中设定如下图所示。在这里,“阈值色阶”的大小,决定了雪花的多少。

5、 单击“确定”按钮,得到结果如下图所示。

6、 将“背景 副本”图层的图层混合模式改为“滤色”,结果如下图所示。  

7、 执行“滤镜>模糊>动感模糊”命令,在“动感模糊”对话框中设定飘雪的方向(角度)和飘雪的速度(距离)。

8、 单击“确定”按钮,得到结果如下图所示。

9、使用将前景色设定为白色,使用画笔在“老虎”的背上进行绘制,可以得到积雪的效果。  

10、可以将飘雪的图层复制一个,再稍稍的错位一下,就可以做成下雪的动态画面了。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/7448905.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-05
下一篇2023-04-05

发表评论

登录后才能评论

评论列表(0条)

    保存