How can I clone html elements and be able to change their properties independently?
I tried this:
function clonar(){
var c = document.getElementById("about0");
var clon = c.cloneNode(true);
clon.style.width = "1000px";
document.body.appendChild(clon);
}
#about {
width: 350px;
height: 350px;
border-radius: 175px;
background-color:gray;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="about"></div>
</body>
</html>
With "independent" I mean that the cloned elements can change their properties, I mean all the properties inherited, if I want to change the color, etc.