length; i++) {
let obj = list[i];
let div = document.createElement("div");
div.className = "item";
let h3 = document.createElement("h3");
h3.innerText = obj.title;
div.appendChild(h3);
let span = document.createElement("span");
span.innerText = obj.text;
div.appendChild(span);
document.getElementById("warp").appendChild(div);
}
</script>
<style>
html,body{
margin: 0;
}
.item{
background-color: #FFFFFF;
display: flex;
flex-direction: column;
padding-left: 20px;
padding-right: 15px;
padding-top: 6px;
padding-bottom: 15px;
}
.item:active{
background-color: #ededed;
}
h3{
font-size: 16.5px;
font-weight: 400;
margin: 0;
}
span{
font-size: 13px;
color: #999999;
margin-top: 4px;
}
*{user-select:none;}
</style>
</body>
Back to home |
File page
Subscribe |
Register |
Login
| N