問題:這是虎摘軍事網(wǎng)的圖文調(diào)用頁(yè)面特效十分漂亮,哪位大哥能夠用ASP直接調(diào)用數(shù)據(jù)庫(kù)來生成?實(shí)例請(qǐng)看 http://junshi.huzhai.com/union/147.html。下面是飛揚(yáng)軍事論壇的圖文調(diào)用特效,像水平線掃描似的刷新出新的圖文,實(shí)例請(qǐng)看:http://junshi.huzhai.com/Detail.aspx?id=3800。
解決:根本不需要用ASP直接調(diào)用數(shù)據(jù)庫(kù)來生成。
內(nèi)容切換特效效果的操作步驟:
一、添加CSS樣式定義:
進(jìn)入后臺(tái)依次打開“系統(tǒng)設(shè)置”->“網(wǎng)站風(fēng)格治理”,修改網(wǎng)站風(fēng)格,在里面添加以下的CSS樣式定義:
/* 圖文調(diào)用頁(yè)面特效定義 */
.clsImg{filter: revealTrans(transition=4,duration=2); width: 750px; position: absolute; margin-top:-62px;}
.clsImgList{width:750px;}
其中filter: revealTrans(transition=4,duration=2)定義了切換特效的內(nèi)容,transition表示設(shè)置或檢索轉(zhuǎn)換所使用的方式(4為向上擦除,有23種切換效果參數(shù)見附二),duration表示設(shè)置或檢索轉(zhuǎn)換完成所用的時(shí)間。position: absolute;表示將對(duì)象從文檔流中拖出。margin-top:-62px表示區(qū)塊上縮進(jìn)-62px,用以定位內(nèi)容。
這二個(gè)CSS可以自定義其內(nèi)容,在后面的模板中會(huì)相繼調(diào)用。
二、修改版式模板:
依次打開“系統(tǒng)設(shè)置”->“網(wǎng)站通用模板頁(yè)治理”,修改網(wǎng)站首頁(yè)模板,在里面添加以下內(nèi)容:
1、在<body>中添加定義“onload="playPage()"”,如:<body onload="playPage()" leftmargin=0 topmargin=0 onmousemove='HideMenu()'>。
2、在需要顯示切換特效的地方添加以下代碼:
<div id='page1' onmouseover='setbFlag(false)' onmouseout='setbFlag(true)' style='VISIBILITY: visible' class='clsImg' >
<div class='clsImgList'>切換內(nèi)容一</div>
</div>
<div id='page2' onmouseover='setbFlag(false)' onmouseout='setbFlag(true)' style='VISIBILITY: hidden' class='clsImg'>
<div class='clsImgList'>切換內(nèi)容二</div>
</div>
<script language="javascript">
<!--
var tmpDiv1 = document.getElementById("page1");
var tmpDiv2 = document.getElementById("page2");
var bFlag = true;
var bShowDiv = true;
function playPage()
{
if(bFlag)
{
if(bShowDiv)
{
nextPage(tmpDiv1, true);
nextPage(tmpDiv2, false);
}
else
{
nextPage(tmpDiv1, false);
nextPage(tmpDiv2, true);
}
setTimeout('playPage()',5000);
}
else
{
setTimeout('playPage()',1000);
}
bShowDiv = !bShowDiv;
return;
}
function setbFlag(b)
{
bFlag = b;
return;
}
|
新聞熱點(diǎn)
疑難解答
圖片精選