我正在制作一个<div>
我想从屏幕左侧移动到然后 100% 接管屏幕的东西。我在让它滑过时遇到了问题。到目前为止,这是我的代码JSFiddle 示例。
function show(){
var website = document.getElementById('website');
website.style.left = '0%;'
} /* I know I don't have much, I did.. I just got it all wrong. */
HTML
<a href="javascript:;" onclick="show()" style="color:#999;">Superman - Wikipedia, the free encyclopedia</a>
<div id="website">
<iframe src="https://en.wikipedia.org/wiki/Superman" width="100%">
</div>
CSS
#website{
height:100%;
position:fixed;
background:#666;
width:100%;
left:100%;
}