最赞回答 / 亚里士多偷
onclick='turn(this)' 这个写在class里面了。不要写在class里面,单独提出来就好了。还有,楼主有个transform拼写成了tranform。
2016-01-17
最新回答 / 斌2233
.photo .side-back{display: none;}这么写是不对的 改成.photo, .side-back{display: none;}
2015-12-23
最赞回答 / 李晓健
为了让warp 垂直居中,因为他先用定位设置了一个top:50%; 这样的话这个图片就会下降到50%的调度,也就是warp 的上边沿正好在他原来的中线上,这时就偏下了,因为warp的高度是600,这600应该在上下部分各占一半,也就是300px,但是因为top:50%, 所以这600全到了下边,想居中就得往上移动300,这样才能保证上下部分各300,所以就有了 margin-top:-300px
2015-12-20
最赞回答 / 木子舟义
function g(selector){ return selector.substring(0, 1) == '.' ? document.getElementsByClassName(selector.substring(1)) : document.getElementById(selector.substring(1)); }
2015-12-04