code refactoring
change class names to cupcakes and cupcake
This commit is contained in:
parent
df84316ad4
commit
025ed292fc
|
@ -9,7 +9,7 @@
|
|||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="chocolates"></div>
|
||||
<div class="cupcakes"></div>
|
||||
<img src="./img/sweets.jpg" alt="a box of chocolate cupcakes">
|
||||
</div>
|
||||
<script src="./script/script.js" defer></script>
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
const chocolateContainer = document.querySelector(".chocolates");
|
||||
const chocolateContainer = document.querySelector(".cupcakes");
|
||||
const notesForEmma = {
|
||||
|
||||
noteOne: "",
|
||||
noteTwo: "",
|
||||
noteThree: "",
|
||||
noteFour: "",
|
||||
noteFive: "",
|
||||
noteSix: "",
|
||||
noteSeven: "",
|
||||
noteEight: "",
|
||||
noteNine: "",
|
||||
noteTen: "",
|
||||
noteEleven: "",
|
||||
noteTwelve: "",
|
||||
};
|
||||
|
||||
for (let i = 0; i < 3; i++) {
|
||||
for (let j = 0; j < 4; j++) {
|
||||
const tile = document.createElement("div");
|
||||
tile.classList.add("chocolate");
|
||||
tile.classList.add("cupcake");
|
||||
tile.style.height = "14vh";
|
||||
tile.style.width = "7vw";
|
||||
chocolateContainer.appendChild(tile);
|
||||
|
|
|
@ -24,7 +24,7 @@ body {
|
|||
z-index: 0;
|
||||
}
|
||||
|
||||
.chocolates {
|
||||
.cupcakes {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
height: 44vh;
|
||||
|
|
Loading…
Reference in New Issue