我有一个预览框可以获取颜色,然后在用户进行更改时进行更改。不过,我有一个需要changine的子div。我怎么可以通过获取id元素来选择孩子div? 这是Java脚本我有在此刻,我要如何改变这个,所以我能得到孩子的div前变色JavaScript中的子Div风格
document.getElementById("flip3D").style.backgroundColor=p1;
#flip3D{
width:200px;
height:200px;
margin:20px;
float:left;
}
#flip3D > .front{
... style stuff is all there just to much toput in and worry about
}
我不明白你在这里问的,JS或CSS? –