EJ 2 y 3 terminados + arreglo de la hoja de estilos
This commit is contained in:
@@ -2,4 +2,21 @@
|
||||
//1
|
||||
const tituloh1 = document.querySelector("h1")
|
||||
console.log(tituloh1.textContent);
|
||||
tituloh1.textContent = "Titulo reemplazado correctamente"
|
||||
tituloh1.textContent = "Titulo reemplazado correctamente"
|
||||
|
||||
//2
|
||||
function List(){
|
||||
const items = document.querySelectorAll("ul li")
|
||||
for (const item of items){
|
||||
item.classList.add("item-lista")
|
||||
}
|
||||
}
|
||||
|
||||
//3
|
||||
function agregarItem(texto){
|
||||
const nuevoLi = document.createElement("li");
|
||||
nuevoLi.textContent = texto;
|
||||
const lista = document.getElementById("lista-inicial");
|
||||
lista.appendChild(nuevoLi);
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,9 @@ h1 {
|
||||
color: #7a5200;
|
||||
font-weight: bold;
|
||||
}
|
||||
.item-lista{
|
||||
color:#d7263d;
|
||||
}
|
||||
|
||||
/* =========================
|
||||
IMAGEN
|
||||
|
||||
Reference in New Issue
Block a user