1.請貼入下列語法於<head>xxx</head>之間或<body>之後
<script
src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript"
src="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/js/jquery.bgImageMenu.js"></script>
<script type="text/javascript"
src="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/js/jquery.easing.1.3.js"></script>
<script type="text/javascript"
src="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/js/jquery.bgImageMenu.js"></script>
<script type="text/javascript"
src="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/js/jquery.easing.1.3.js"></script>
2.請貼入下列驅動語法於<body>之後
<script>
$(function () {
$('#sbi_container').bgImageMenu({
defaultBg : '開頭照片網址',
menuSpeed : 300,
border : 1,
width : 580,
height : 386 ,
type : {
mode : 'verticalSlideAlt',
speed : 450,
easing : 'easeOutBack'
}
});
});
</script>
$(function () {
$('#sbi_container').bgImageMenu({
defaultBg : '開頭照片網址',
menuSpeed : 300,
border : 1,
width : 580,
height : 386 ,
type : {
mode : 'verticalSlideAlt',
speed : 450,
easing : 'easeOutBack'
}
});
});
</script>
3.請於<body>之後貼入CSS
<link rel="stylesheet" type="text/css"
href="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/css/sbimenu.css"
media="screen">
<style>
.sbi_content ul li{
font-family: Verdana, '微軟正黑體';
font-size: 1.02em;
font-weight: normal;
line-height: 160%;
text-align: left;
background: rgba(105,105,105,0.6);
height: 100px;
}
</style>
href="http://lmcdwriting.org/userfiles/lmcsilver20121007/SlidingBackgroundImageMenu/css/sbimenu.css"
media="screen">
<style>
.sbi_content ul li{
font-family: Verdana, '微軟正黑體';
font-size: 1.02em;
font-weight: normal;
line-height: 160%;
text-align: left;
background: rgba(105,105,105,0.6);
height: 100px;
}
</style>
4.請於欲出現的編輯區貼入HTML
<div id="sbi_container" class="sbi_container">
<div class="sbi_panel"
data-bg="第一照片網址"><a
href="#" class="sbi_label">第一標題 </a>
<div class="sbi_content">
<ul>
<li>第一內文 <br>
</li>
</ul>
</div>
</div>
<div class="sbi_panel"
data-bg="第二照片網址">
<a href="#" class="sbi_label">第二標題</a>
<div class="sbi_content">
<ul>
<li>第二內文<br>
<br>
</li>
</ul>
</div>
</div>
<div class="sbi_panel"
data-bg="第三照片網址">
<a href="#" class="sbi_label">第三標題</a>
<div class="sbi_content">
<ul>
<li>第三內文<br>
</li>
</ul>
</div>
</div>
</div>
<div class="sbi_panel"
data-bg="第一照片網址"><a
href="#" class="sbi_label">第一標題 </a>
<div class="sbi_content">
<ul>
<li>第一內文 <br>
</li>
</ul>
</div>
</div>
<div class="sbi_panel"
data-bg="第二照片網址">
<a href="#" class="sbi_label">第二標題</a>
<div class="sbi_content">
<ul>
<li>第二內文<br>
<br>
</li>
</ul>
</div>
</div>
<div class="sbi_panel"
data-bg="第三照片網址">
<a href="#" class="sbi_label">第三標題</a>
<div class="sbi_content">
<ul>
<li>第三內文<br>
</li>
</ul>
</div>
</div>
</div>
注意:一但設定圖文框的寬度、高度值之後,要放進去的圖片也要剪裁成同樣大小的照片,這樣照片才能完整的呈現出來。
原始語法來源:Sliding Background Image Menu