代码生成的花瓣(JS里可以使用数学三角函数!!)
<script>function drawp(x,y,color)
{
document.write("<hr style='position: absolute; left: "+(x+300)+"; top: "+(y+200)+";color: "+color+"' src='px.gif' size=2 width=2px>")
}
for(t=1;t<=360;t++)
{
lo=200 * Math.sin(2 * (Math.PI / 180) * t);
x = lo * Math.cos((Math.PI / 180) * t);
y = lo * Math.sin((Math.PI / 180) * t);
drawp(x,y,"#0000ff");
lo=200 * Math.cos(2 * (Math.PI / 180) * t);
x = lo * Math.cos((Math.PI / 180) * t);
y = lo * Math.sin((Math.PI / 180) * t);
drawp(x,y,"#336600");
}
</script>
<script>
function drawp(x,y,color)
{
document.write("<hr style='position: absolute; left: "+(x+300)+"; top: "+(y+200)+";color: "+color+"' src='px.gif' size=1 width=1px>")
}
for(t=1;t<=360;t++)
{
lo=200 * Math.sin(2 * (Math.PI / 180) * t);
x = lo * Math.cos((Math.PI / 180) * t);
y = lo * Math.sin((Math.PI / 180) * t);
drawp(x,y,"#000000");
lo=200 * Math.cos(2 * (Math.PI / 180) * t);
x = lo * Math.cos((Math.PI / 180) * t);
y = lo * Math.sin((Math.PI / 180) * t);
drawp(x,y,"#ff0000");
}
</script> 强人,可惜颜色不怎么好,要是能搞成蓝色的或者其他的颜色就好了 怎么删除回复??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<xml>
<MSHelp:Keyword Index="A" Term="vmltext4"/>
</xml>
<TITLE>VML text</TITLE>
<style>
v\:* { behavior: url(#default#VML); }
</style>
</head>
<BODY BGCOLOR="#FFFFFF">
<v:shape style="position: absolute; top: 25px; left: 5px;
width: 300px; height: 300px; antialias: true"
coordsize="300,300">
<v:path textpathok="True" v="m 0,0 l 300,200" />
<v:fill on="True" color="#999999"/>
<v:stroke on="false" />
<v:textpath
on="True"
fitpath="true"
string="Where do you want to go today?"
style="font:normal normal bold 12pt Arial" />
</v:shape>
</BODY>
</HTML>
<html xmlns:v>
<style>
v\:*{behavior:url(#default#VML)}
</style>
<body>
<div style="POSITION: absolute">
<DIV id=div1 style="CURSOR: default; POSITION: absolute;left:100">
<v:shape title="" style="WIDTH: 1px; POSITION: absolute; HEIGHT: 1px" coordsize = "1,1" fillcolor = "black" strokecolor = "#8b0101" strokeweight = "0" path = " m80,110 qx50,150,100,195,150,150,120,110 l100,115 x e"><v:fill type = "gradient" opacity = "1" angle = "135" method = "sigma" colors = "39321f red"></v:fill><v:shadow on = "t" type = "emboss" opacity = "52428f" offset = "2.25pt,2.25pt" offset2 = "3.75pt,3.75pt"></v:shadow></v:shape><v:shape title="" style="WIDTH: 1px; POSITION: absolute; HEIGHT: 1px" coordsize = "1,1" fillcolor = "#0c0" strokecolor = "#004600" strokeweight = "0" path = " m110,90 c120,50,150,60,170,60 xe"></v:shape><v:shape title="" style="WIDTH: 1px; POSITION: absolute; HEIGHT: 1px" coordsize = "1,1" fillcolor = "#090" strokecolor = "#004600" strokeweight = "0" path = " m170,60 c160,90,140,100,110,90 xe"></v:shape><v:line style="LEFT: 0px; POSITION: absolute; TOP: 0px" from = "82.5pt,67.5pt" to = "72.75pt,72.75pt" strokecolor = "#004600" strokeweight = "0"><v:stroke startarrow = "none" endarrow = "none"></v:stroke></v:line><v:curve style="LEFT: 0px; POSITION: absolute; TOP: 0px" from = "63.75pt,60pt" control1 = "75pt,67.5pt" control2 = "75pt,86.25pt" to = "75pt,86.25pt" strokecolor = "#8b0101" strokeweight = "2pt">
</div>
<div style=height:400></div>
</body>
原帖由 admin 于 2007-3-5 18:38 发表
强人,可惜颜色不怎么好,要是能搞成蓝色的或者其他的颜色就好了
汗~~自己看代码
里面有定义颜色的地方
页:
[1]