ajout sticky

This commit is contained in:
lina 2025-03-02 23:14:34 +01:00
parent 99267af2dd
commit 1b3a3f6486
3 changed files with 6646 additions and 6640 deletions

View File

@ -9,6 +9,11 @@ body {
background-color: #ffff;
}
.sticky {
position: sticky;
top: 0px;
}
.single-poke {
background-color: #ff0000;
}

View File

@ -38,6 +38,7 @@ class App extends Component {
render() {
return (
<div className="App">
<div className='sticky'>
<section className="single-poke">
<img src="https://logos-world.net/wp-content/uploads/2020/05/Pokemon-Logo.png" alt="logo-pokemon"/>
@ -49,12 +50,12 @@ class App extends Component {
<p><b>Height : </b>{this.state.currentPokemon.height}</p>
<p><b>Weight : </b>{this.state.currentPokemon.weight}</p>
<p><b>Type : </b>{this.state.currentPokemon.types[0].type.name}</p>
</div>
</div>) :
(<h1>Choisis un pokemon</h1>)
}
</section>
</div>
<section className="poke-img">
{this.state.list.map((elem, index) => {
return (

13248
yarn.lock

File diff suppressed because it is too large Load Diff