I want to set value for the div ,I tried many ways but all of them didnt work. I think the syntax is correct because I made alots of research
.flip3d2{width:100px;height:100px;margin:10px; float:left;}
.flip3d2 .front{
position:absolute;
-webkit-transform:perspective(600px) rotateY(0degdeg);
transform: perspective(600px) rotateY(0deg);
background:#fc0;width:100px;height:100px;border-radius:7px;
-webkit-backface-visibility:hidden;
backface-visibility:hidden;
transition:-webkit-transform .5s linear 0s;
transition:transform .5s linear 0s;
}
.flip3d2 .back{
position:absolute;
-webkit-transform:perspective(600px) rotateY(180deg);
transform: perspective (600px) rotateY(180deg);
background:#80bfff;width:100px;height:100px;border-radius:7px;
-webkit-backface-visibility:hidden;
backface-visibility:hidden;
transition:-webkit-transform .5s linear 0s;
transition:transform .5s linear 0s;
}
.flip3d2:hover .front
{
-webkit-transform:perspective(600px) rotateY(-180deg);
transform:perspective(600px) rotateY(-180deg);
}
.flip3d2:hover .back
{
-webkit-transform:perspective(600px) rotateY(0deg);
transform:perspective(600px) rotateY(0deg);
}
</style>
<script>
var list = document.getElementsByClassName("mainwindow");
var list2=list.getElementsByClassName("flip3d2");
list2.getElementsByClassName("front").value = "red";
list2.getElementsByClassName("front").text = "red";
list2.getElementsByClassName("front").innerHTML = "red";
</script>
</head>
<body>
<div class="mainwindow">
<div class="flip3d2">
<div class="back"> box 2 - back</div>
<div class="front"> box 2 - front</div>
</div>
</div>
</body>
</html>
Itried three ways to set values for the div but no one work.