午夜国产狂喷潮在线观看|国产AⅤ精品一区二区久久|中文字幕AV中文字幕|国产看片高清在线

    將discuz X2返回頂部的按鈕X1.5中實現步驟
    來源:易賢網 閱讀:935 次 日期:2014-09-02 17:38:13
    溫馨提示:易賢網小編為您整理了“將discuz X2返回頂部的按鈕X1.5中實現步驟”,方便廣大網友查閱!

    很多人都想讓x2中的返回頂部移動到1.5上,那么下面我就教大家如何將這個功能移動到1.5上。

    首先打開X2安裝包你需要講一下幾處的代碼移動到 1.5中。

    1.打開x2中的./static/js/common.js找到這段js函數將它復制到x1.5中的./static/js/common.js文件底部。

    function showTopLink() {

    if($('ft')){

    var viewPortHeight = parseInt(document.documentElement.clientHeight);

    var scrollHeight = parseInt(document.body.getBoundingClientRect().top);

    var basew = parseInt($('ft').clientWidth);

    var sw = $('scrolltop').clientWidth;

    if (basew < 1000) {

    var left = parseInt(fetchOffset($('ft'))['left']);

    left = left < sw ? left * 2 - sw : left;

    $('scrolltop').style.left = ( basew + left ) + 'px';

    } else {

    $('scrolltop').style.left = 'auto';

    $('scrolltop').style.right = 0;

    }

    if (BROWSER.ie && BROWSER.ie < 7) {

    $('scrolltop').style.top = viewPortHeight - scrollHeight - 150 + 'px';

    }

    if (scrollHeight < -100) {

    $('scrolltop').style.visibility = 'visible';

    } else {

    $('scrolltop').style.visibility = 'hidden';

    }

    }

    }

    2.找到x2中的./template/default/common/footer.htm,將以下代碼

    <span id="scrolltop">{lang scrolltop}</span>

    <script type="text/javascript">_attachEvent(window, 'scroll', function(){showTopLink();});</script>

    復制到x1.5中的./template/default/common/footer.htm文件中的<!--{eval output();}-->這段代碼的上面。

    3.找到找到x2中的./template/default/common/common.css,將以下代碼

    #scrolltop { visibility: hidden; position: fixed; bottom: 100px; display: block; margin: -30px 0 0; width: 26px; height: 50px; background: url({IMGDIR}/scrolltop.png) no-repeat 50% 0; line-height: 999px; overflow: hidden; cursor: pointer; }

    .ie6 #scrolltop { position: absolute; bottom: auto; }

    復制到x1.5中的./template/default/common/common.css文件中.

    4.找到找到x2中的./static/image/common/scrolltop.png復制到x1.5中的./static/image/common/文件中.

    然后更新緩存。前臺刷新頁面看看吧

    更多信息請查看IT技術專欄

    更多信息請查看CMS教程
    由于各方面情況的不斷調整與變化,易賢網提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢?yōu)闇剩?/div>
    相關閱讀CMS教程

    2025國考·省考課程試聽報名

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關于我們 | 聯系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
    聯系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網