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