| Level Navigation: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18⚡ | 19 |
User Story: As a user, I want to see an orchard background with an apple target so that I understand what to click.
Create the HTML structure with CSS styling for the game board and clickable apple.
App.jsx, create a div with className orchard-backgroundapple-targetApp.css, style the orchard-background:
position: relative (so children can position absolutely)background-image to your orchard imagebackground-size: containposition: absolutebackground-image to your apple imagebackground-size: containNeed help with styling? Check out these snippets:
import './App.css'
function App() {
return (
<>
<div className='orchard-background'>
<div className="apple-target"></div>
</div>
</>
)
}
export default App
* {
box-sizing: border-box;
}
.orchard-background {
position: relative;
background-image: url("/orchard.png");
background-size: contain;
width: 500px;
height: 700px;
}
.apple-target {
position: absolute;
background-image: url("/apple.png");
background-size: contain;
width: 100px;
height: 100px;
}
/ in CSSpublic/ folder