發現這些線路
this.o = document.createElement('div');
this.o.innerHTML = storm.snowCharacter;
this.o.style.color = storm.snowColor;
this.o.style.position = (fixedForEverything?'fixed':'absolute');
this.o.style.width = storm.flakeWidth+'px';
this.o.style.height = storm.flakeHeight+'px';
this.o.style.fontFamily = 'arial,verdana';
this.o.style.cursor = 'default';
this.o.style.overflow = 'hidden';
this.o.style.fontWeight = 'normal';
this.o.style.zIndex = storm.zIndex;
的 「O」 這裏是你的div元素。您可以通過加入這一行添加它的類:
this.o.className = "myClass";
若要刪除字符刪除此行:
this.o.innerHTML = storm.snowCharacter;
比你可以風格的CSS的雪花,你知道它的方式。只要給它一個背景圖片。您也可以刪除設置顏色,寬度和高度的線條,並使用CSS設置它們的樣式。
正是我在找的東西。非常感謝你! – Ewan 2013-05-09 18:20:25