main #15

Open
hidalgo.geronimo wants to merge 6 commits from hidalgo.geronimo/clase-8-DOM:main into main
2 changed files with 16 additions and 0 deletions
Showing only changes of commit 868cf5a5fd - Show all commits

View File

@@ -5,3 +5,11 @@ const changeText = (str) => {
const h1 = document.querySelector("h1");
h1.textContent = str;
}
// Ejercicio 2
const addClass = (className) => {
const itemLista = document.querySelectorAll("li");
itemLista.forEach((item) => {
item.classList.add(className);
});
}

View File

@@ -101,6 +101,14 @@ h1 {
font-weight: bold;
}
/* Clase item-lista */
.item-lista {
background: #fff4d6;
border-color: #f4b400;
color: #7a5200;
font-weight: bold;
}
/* =========================
IMAGEN
========================= */