diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 144ec6e..3ee0dcb 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -19,4 +19,14 @@ function agregarItem(texto){ lista.appendChild(nuevo); +} + +function destacarImportantes() { + const parrafos = document.querySelectorAll("#parrafos p"); + + for (const p of parrafos) { + if (p.textContent.includes("importante")) { + p.classList.add("destacado"); + } + } } \ No newline at end of file diff --git a/estilo.css b/estilo.css index 6c2d1de..dc6a0dc 100644 --- a/estilo.css +++ b/estilo.css @@ -144,7 +144,7 @@ h1 { .destacado { background: linear-gradient(135deg, #4a90e2, #357abd); - color: white; + color: rgb(255, 255, 255); font-weight: bold; padding: 18px !important; box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);