diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 11873ab..0407aa0 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -2,4 +2,12 @@ function cambiarTitulo() { const titulo = document.querySelector("h1"); titulo.textContent = "Agua"; +} + +function agregarClaseItems() { + const items = document.querySelectorAll("li"); + + for (const item of items) { + item.classList.add("item-lista"); + } } \ No newline at end of file diff --git a/estilo.css b/estilo.css index fcb26fc..35d4dbf 100644 --- a/estilo.css +++ b/estilo.css @@ -101,6 +101,12 @@ h1 { font-weight: bold; } +.item-lista { + color: red; + font-weight: bold; + background-color: yellow; +} + /* ========================= IMAGEN ========================= */