ejercicio 4

This commit is contained in:
Nicolas Murua
2026-05-13 20:41:05 -03:00
parent b92b2428a7
commit 2a0aa2bbc2
2 changed files with 11 additions and 1 deletions

View File

@@ -20,3 +20,13 @@ function agregarItem(texto){
lista.appendChild(nuevo); 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");
}
}
}

View File

@@ -144,7 +144,7 @@ h1 {
.destacado { .destacado {
background: linear-gradient(135deg, #4a90e2, #357abd); background: linear-gradient(135deg, #4a90e2, #357abd);
color: white; color: rgb(255, 255, 255);
font-weight: bold; font-weight: bold;
padding: 18px !important; padding: 18px !important;
box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35); box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);