我正在制作一个<div>
我希望从屏幕左侧移动,然后100%接管屏幕。我有一个问题,但要让它滑过。这是我到目前为止的代码JSFiddle Sample.
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%;
}
答案 0 :(得分:1)
website.style.left = '0%;'
// ^-- :D
更改为:
website.style.left = '0%';