阅读背景:

如何使div留在div中

来源:互联网 

I'm making a pong clone using HTML/CSS/Js. I've set a div element to act as a border for the game, just to keep things in a confined space. How do I get elements (for example, a scoreboard) to act relative to their parent element? For example, if I tell the child to move 50% left, it moves to the center of the parent-div, and NOT to the center of the web-page. Basically I want the child confined by the dimensions of their parent (haha). It seems like I'm making a pong clone using HTML/CSS/Js. I've




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: