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





边栏推荐
- 字符串 & 堆 & 方法区
- JS foundation 3
- 【Qt】connect 语法参考实现
- 零基础自学SQL课程 | IF函数
- Recommended practice sharing of Zhilian recruitment based on Nebula graph
- Katalon framework tests a web page operation example code
- Gee: mcd64a1 based globfire daily fire data set
- Metersphere implements UI automation elements that are not clickable (partially occluded)
- 一套十万级TPS的IM综合消息系统的架构实践与思考
- [cloud resident co creation] detailed introduction to DWS alarm service DMS and cluster connection mode
猜你喜欢

还在用 SimpleDateFormat 做时间格式化?小心项目崩掉!

String & heap & method area

零基础自学SQL课程 | IF函数
This Exception was thrown from a job compiled with Burst, which has limited exception support. report errors

Move command

Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community

字符串 & 堆 & 方法区

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

Oracle 日期格式化异常:无效数字

Making and using of static library
随机推荐
AGCO AI frontier promotion (6.28)
人人都可以参与开源!龙蜥社区最不容错过的开发者活动来了
《运营之光3.0》全新上市——跨越时代,自我颠覆的诚意之作!
When an entity is converted to JSON, the field with null value is lost
Fancy features and cheap prices! What is the true strength of Changan's new SUV?
Secretary of the Ukrainian national security and National Defense Commission: will carry out precision strikes against targets in Russia
soapui的菜鸟教程
Makefile简介
【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community
Oracle 日期格式化异常:无效数字
Practice and Thinking on the architecture of a set of 100000 TPS im integrated message system
Using loops for, while, and if in katalon else、break、continue
买股票在中金证券经理的开户二维码上开户安全吗?求大神赐教
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
使用logrotate对宝塔的网站日志进行自动切割
如临现场的视觉感染力,NBA决赛直播还能这样看?
阿里三面:LEFT JOIN关联表中用ON还是WHERE跟条件有什么区别
JS基础8
Graduated