addPhoto()调用后,.wrap的perspective属性就没效果了?
.wrap{ perspective: 800px; -webkit-perspective: 800px; -moz-perspective: 800px; } .photo-wrap{ position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; /*-moz-transform-style: preserve-3d;*/ transition:all .6s ease-out; }
function addPhotos() { var template=get('#wrap').innerHTML; var html=[]; for(var i in data){ var _html=template .replace('{{index}}',i) .replace('{{caption}}',data[i].caption) .replace('{{img}}',data[i].img) .replace('{{desc}}',data[i].desc) html.push(_html) } get('#wrap').innerHTML=html.join(''); } addPhotos();
此函数调用后,卡片翻转就没有3d效果了,只是平面压缩效果,这是为啥?