当前位置:网站首页>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





边栏推荐
- Recommended practice sharing of Zhilian recruitment based on Nebula graph
- 近况
- [sword finger offer] 49 Ugly number
- How to distinguish and define DQL, DML, DDL and DCL in SQL
- 一套十万级TPS的IM综合消息系统的架构实践与思考
- Create ECS using API shortcut
- Get current system date
- [sciter]:sciter如何使用i18实现桌面应用多语言切换及其利弊
- JS基础2
- 分析list中有无重复数据且重复了几次
猜你喜欢

Docker modifies the user name and password of MySQL

JS foundation 3

TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush

Making and using of static library

Redis6 1: what problems can be solved by the introduction of NoSQL and redis?

ThreadLocal的简单理解

获取系统当前日期

人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了

How to use output in katalon
![[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)](/img/e8/21d8d81a3d7b544687d6adc06ad4b1.png)
[practice] 1364- implement a perfect waterfall flow component on the mobile terminal (with source code)
随机推荐
ThreadLocal的简单理解
Download and install mysql5.7 for windows 10
This Exception was thrown from a job compiled with Burst, which has limited exception support. 报错
工作组环境下的内网渗透:一些基础打法
BigDecimal 类的 compareTo() 和 equals()方法
JS基础8
JS foundation 6
Word、PDF、TXT文件实现全文内容检索需要用什么方法?
Does flink1.15 support MySQL views? I configured the view name at the table name to save, but the table could not be found. Think
毕业季 新的开始
获取系统当前日期
JS基础2
随机森林以及 AMR 训练出的诗词制造器
近况
太阳能无线LED显示屏的特点
Metersphere uses JS to refresh the current page
【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
分析list中有无重复数据且重复了几次
windows 10下载安装mysql5.7
Setinterval, setTimeout and requestanimationframe