Hello.
I'm trying to make a simple two-player game with HTml + JS, but I'm posting a question because there's a problem.
Two players have to bisect the screen left and right to play the game At first, I tried using the div tag When the tag is closed, the screen is divided up and down due to the wrapping property. I tried using the span tag, but I couldn't give the horizontal and vertical values with the inline attribute inline.
Is there a CSS property or screen split tag that appears on one line (inline) and fills its own parent node?
html div span
Welcome to the CSS Intermediate Course!The name of the field that deals with the problem you mentioned is Grid. Why is there such a field? It's because there's no other answer. So far, there have been a number of approaches:
Now! Start searching. The world is your oyster.
<div class="container">
<div class="item">
</div>
<div>
</div class="item">
</div>
<style>
.container{
min-height: 100vh;
display: flex;
flex-direction: row;
}
.item{
flex-grow: 1;
}
</style>
I'm leaving an address just in case it helps.
https://opentutorials.org/course/2039
https://medium.com/alex-hinds-portfolio/making-an-html5-game-using-paper-js-dc05f51119d5
© 2024 OneMinuteCode. All rights reserved.