我创建了一个tile(metro ui css),并且tile确实如下:
我无法删除图块的缩放效果。我已经尝试删除图块类,但它无法正常工作。请点击图块后帮我删除缩放效果。这是代码。
HTML
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="tile" id="vii">
<div class="tile-content slide-right" >
<div class="slide slide1">
<video id="myvideo" controls muted>
<source src="1.mp4" type="video/mp4" />
</video>
</div>
<div class="slide-over slide-over1" id="viii">
Attack by Smit
</div>
</div>
</div>
</div>
</div>
</div>
的JavaScript
var myvideo = document.getElementById("myvideo");
var myaudio = document.getElementById("myaudio");
document.getElementById("vii").onclick=function(){
myvideo.play();
myvideo.style.display="block";
myvideo.style.width="600px";
myvideo.style.height="300px";
document.getElementById("viii").style.display="none";
}
以下是代码段:
http://jsbin.com/tujakasuci/1/edit?html,output
谢谢!!
答案 0 :(得分:1)
您应该点击,删除slide-right
类。缩放效果来自这个类:
document.getElementById("vii").onclick=function(){
$('.tile-content').removeClass("slide-right");
myvideo.play();
myvideo.style.display="block";
myvideo.style.width="600px";
myvideo.style.height="300px";
document.getElementById("viii").style.display="none";
}