随笔分类 - 前端
前端相关问题以及解决
摘要:JS_双人格斗游戏 _移动键同时按下问题 问题描述: if(keys.a.pressed){ player.velocity.x = -1; }else if (keys.d.pressed){ player.velocity.x = 1; } 这段代码在animate()循环函数中,接收键盘传来的
阅读全文
摘要:# css_margin塌陷问题 ### 问题描述 ```html ``` 当**child1**设置了margin-top时,margin-top会作用在father上 当**child2**设置了margin——bottom时,margin-bottom会作用在father上 ### 解决方法
阅读全文