diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 97f5d50..978f76c 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -5,4 +5,13 @@ const changeTittle = (a) => { const tittle = document.querySelector('h1'); tittle.textContent = a; +} + +// Ejercicio 2 + +const addClass = (a) => { + const list = document.querySelectorAll('li'); + list.forEach((item) => { + item.classList.add(a); + }); } \ No newline at end of file diff --git a/estilo.css b/estilo.css index fcb26fc..e55df68 100644 --- a/estilo.css +++ b/estilo.css @@ -101,6 +101,14 @@ h1 { font-weight: bold; } +/* Clase item-lista */ +.item-lista { + background: #fff4d6; + border-color: #f4b400; + color: #7a5200; + font-weight: bold; +} + /* ========================= IMAGEN ========================= */