2024年6月2日发(作者:)
html圣诞树代码
1
2
3
4
5
6 html, body
7 {
8 width: 100%;
9 height: 100%;
10 margin: 0;
11 padding: 0;
12 border: 0;
13 }
14
15 div
16 {
17 margin: 0;
18 padding: 0;
19 border: 0;
20 }
21 .nav
22 {
23 position: absolute;
24 top: 0;
25 left: 0;
26 width: 100%;
27 height: 27px;
28 background-color: white;
29 color: black;
30 text-align: center;
31 line-height: 25px;
32 }
33 a
34 {
35 color: black;
36 text-decoration: none;
37 border-bottom: 1px dashed black;
38 }
39 a:hover
40 {
41 border-bottom: 1px solid red;
42 }
43 .previous
44 {
45 float: left;
46 margin-left: 10px;
47 }
48 .next
49 {
50 float: right;
51 margin-right: 10px;
52 }
53 .green
54 {
55 color: green;
56 }
57 .red
58 {
59 color: red;
60 }
61 textarea
62 {
63 width: 100%;
64 height: 100%;
65 border: 0;
66 padding: 0;
67 margin: 0;
68 padding-bottom: 20px;
69 }
70 .block-outer
71 {
72 float: left;
73 width: 22%;
74 height: 100%;
75 padding: 5px;
76 border-left: 1px solid black;
77 margin: 30px 3px 3px 3px;
78 }
79 .block-inner
80 {
81 height: 68%;
82 }
83 .one
84 {
85 border: 0;
86 }
87
88
89
90
91
114
120
121 M=Math;
122 Q=;J=[];
123 U=16;
124 T=;
125 E=;
126 for(O=k=0;x=z=j=i=k<200;)
127 with(M[k]=k?ode(0):c)
128 {
129 width=height=k?32:W=446;
130 with(getContext('2d'))
131 if(k>10|!k)
132 for(
133 font='60px Impact',
134 V='rgba(';I=i*U,fillStyle=k?k==13?V+'205,205,215,.15)':
135 V+(147+I)+','+(k%2?128+I:0)+','+I+',.5)':'#cca',i<7;
136 )
137 beginPath(
138 fill(
139 arc(
140 U-i/3,
141 24-i/2,
142 k==13?4-(i++)/2:8-i++,
143 0,
144 *2,1
145 )
146 )
147 );
148 else for(;
149 x=T(i),
150 y=Q()*2-1,
151 D=x*x+y*y,
152 B=E(D-x/.9-1.5*y+1),
153 R=67*(B+1)*(L=k/9+.8)>>1,
154 i++ 155 ) 156 if(D<1) 157 beginPath( 158 strokeStyle=V+R+','+(R+B*L>>0)+',40,.1)' 159 ), 160 moveTo(U+x*8,U+y*8), 161 lineTo(U+x*U,U+y*U), 162 stroke(); 163 for( 164 y=H=k+E(k++)*25, 165 R=Q()*W; 166 P=3,j 167 ) 168 J[O++]=[x+=T(R)*P+Q()*6-3,y+=Q()*U-8,z+=T(R-11)*P+Q()*6-3,j/H*20+((j+=U)>H&Q()>.8?Q(P=9)*4:0)>>1] 169 } 170 setInterval(function G(m,l) 171 { 172 A=T(D-11); 173 if(l) 174 return( 175 m[2]-l[2])*A+(l[0]-m[0])*T(D); 176 ect(0,0,W,W); 177 (G); 178 for( 179 i=0; 180 L=J[i++]; 181 age 182 ( 183 M[L[3]+1],207+L[0]*A+L[2]*T(D)>>0,L[1]>>1) ) 184 { 185 if(i==2e3) 186 xt 187 ( 188 'Happy Christmas!', 189 U,345); 190 if(!(i%7)) 191 age 192 ( 193 M[13], 194 ((157*(i*i)+T(D*5+i*i)*5)%W)>>0, 195 ((113*i+(D*i)/60)%(290+i/99))>>0 196 ); 197 } 198 D+=.02 199 },1) 200 201 202
发布评论