0

我正在制作一个<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%;
}
4

1 回答 1

1

啊,我看到了错误。你会因为这个而恨自己:D

website.style.left = '0%;'
                     // ^-- :D

改成:

website.style.left = '0%';
于 2013-06-28T00:43:00.000 回答