当前位置:网站首页>Day39 prototype chain and page Fireworks Effect 2021.10.13
Day39 prototype chain and page Fireworks Effect 2021.10.13
2022-06-28 11:23:00 【Le petit rêve d'être un grand homme】
Chaîne prototype:(ObjectC'est le constructeur de haut niveau,InjsTout est un objet.)
Tant qu'il s'agit d'un objet, il a une propriété__proto__,
Les objets prototypes sont aussi des objets,Donc l'objet prototype a aussi__proto__Propriétés,Cette propriété pointe également vers un objet prototype
Objet instance__proto__Pointer vers l'objet prototype,De l'objet prototype__proto__Pointer vers un autre objet prototype,Ce sont des objets.,Tous.__proto__Propriétés,Donc les derniers prototypes trouvés sontObject.prototype

Règles d'accès pour les propriétés de la méthode de l'objet instance:
Lorsque l'objet instance accède aux propriétés,Cherchez d'abord l'objet instance lui - même,Utilisez - le quand vous le trouvez.
Si vous ne trouvez pas,Dans__proto__Rechercher dans l'objet prototype pointé,Utilisez - le quand vous le trouvez.
S'il n'est pas trouvé dans le prototype qui va à l'objet prototype,Trouver, c'est utiliser
Impossible de trouver continuer à chercher dans le prototype,Enfin trouvéObject.prototypePrototypes,
S'il n'y a toujours pas d'attribut ou de méthode ,Renvoieundefined

Réaliser l'effet pyrotechnique de la page :
Analyse par étapes:
1. Il y a un fond de ciel nocturne 1000*600

2. Donnez un clic au ciel nocturne , Cliquez sur le ciel nocturne div Un feu d'artifice apparaît en bas

-- Où les feux d'artifice carrés apparaissent , La position horizontale est la même que celle du clic
3. Des feux d'artifice de fond , Monter à la position cliquée ,Et disparaître( Plusieurs feux d'artifice apparaissent après la disparition )

4. Effets explosifs des feux d'artifice à points , Chaque point de feu d'artifice se déplace dans une position aléatoire ,Et disparaître

Fonctions à préparer :
Fonction de mouvement,Fonction de couleur aléatoire, Obtient la fonction du nombre aléatoire de la plage , Fonction Pour styliser un élément





边栏推荐
- 基于验证码识别的机器学习项目captcha_trainer操作实践
- JS基础1-JS引入与运算符
- 人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了
- Industry analysis - quick intercom, building intercom
- Setinterval, setTimeout and requestanimationframe
- BigDecimal 类的 compareTo() 和 equals()方法
- 工作组环境下的内网渗透:一些基础打法
- 乌国家安全与国防委员会秘书:将对俄境内目标进行精确打击
- Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community
- 关于Pytorch中双向LSTM的输出表示问题
猜你喜欢

Industry analysis - quick intercom, building intercom

字符串 & 堆 & 方法区
![[monkey] Introduction to monkey test](/img/70/5a7152d0b6b77df7f9d6ad0e09e000.png)
[monkey] Introduction to monkey test

Making and using of dynamic library (shared library)

培训通知|2022年境外中资企业机构及人员疫情防控和安全防范专题培训通知

Redis6 一:Nosql引入、Redis可以解决什么问题?

功能真花哨,价格真便宜!长安全新SUV真实力到底怎样?

静态库的制作和使用

New listing of operation light 3.0 - a sincere work of self subversion across the times!

Wealth management for programmers
随机推荐
Debug debugging in katalon
JS foundation 5
智联招聘基于 Nebula Graph 的推荐实践分享
MytipartFile与File的相互转换
Move command
When an entity is converted to JSON, the field with null value is lost
Recommended practice sharing of Zhilian recruitment based on Nebula graph
Oracle 日期格式化异常:无效数字
Setinterval, setTimeout and requestanimationframe
工作组环境下的内网渗透:一些基础打法
New listing of operation light 3.0 - a sincere work of self subversion across the times!
基于验证码识别的机器学习项目captcha_trainer操作实践
人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了
AGCO AI frontier promotion (6.28)
Word、PDF、TXT文件实现全文内容检索需要用什么方法?
动态库(共享库)的制作和使用
【agora】get 一个 agora_refptr 对象的用法示例
李宏毅《机器学习》丨7. Conclusion(总结)
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
方法重写(Override)