forked from marquez.juan/clase-8-DOM
ejercicio 4
This commit is contained in:
@@ -19,4 +19,14 @@ 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user