0
前言:我可恥壞在這個東西Jparallax激活
行,所以我想用Jparallax在一個div上,我不能讓它的工作。一旦我有演示工作,我會修改它,但現在我甚至可以做到這一點。我已經從演示中複製了#parallax的css,將頭部中的.js鏈接起來,並複製了腳本以激活頭部中的#parallax,但是由於某種原因,該div未激活。
我的HTML
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Portal</title>
<link href='http://fonts.googleapis.com/css?family=Jura:400,300,500,600'rel='stylesheet' type='text/css'>
<link href="portalcss.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="dropdown.css" type="text/css" />
<script type="text/javascript" src="jquery.jparallax.js"></script>
<script type="text/javascript" src="dropdown.js"></script>
<script type="text/javascript">
window.onload = maxWindow;
function maxWindow() {
window.moveTo(0, 0);
if (document.all) {
top.window.resizeTo(screen.availWidth, screen.availHeight);
}
else if (document.layers || document.getElementById) {
if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) {
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
</script>
<script type="text/javascript">
<!--
// jQuery.noConflict();
// RUN
var corners = '<img src="images/corner_dark_tl.png" class="tl" />'+
'<img src="images/corner_dark_tr.png" class="tr" />'+
'<img src="images/corner_dark_bl.png" class="bl" />'+
'<img src="images/corner_dark_br.png" class="br" />';
jQuery(document).ready(function(){
jQuery('h1').html('<img src="images/logo_stephband_grey.png" />');
jQuery('#parallax').jparallax().append(corners);
});
//-->
</script>
</head>
<body>
<div id="parallax">
<img src="0.png" alt="" style="width:978px; height:325px;"/>
<img src="1.png" alt="" style="width:987px; height:328px;"/>
<img src="2.png" alt="" style="width:1001px; height:333px;"/>
<img src="3.png" alt="" style="width:1031px; height:343px;"/>
<img src="4.png" alt="" style="width:1067px; height:355px;"/>
<img src="5.png" alt="" style="width:1120px; height:373px;"/>
<img src="6.png" alt="" style="width:1200px; height:400px;"/>
</div>
這裏是我爲#
#parallax
{
background:#2f3134;
position:relative;
overflow:hidden;
width:60em;
height:300px;
margin:1.5em 0;
}
這一切都是從這個演示this demo 任何幫助深表感謝