• zencart新进产品滚动


    下面是whats'new的代码,红色为加上去的代码!!!

    <?php

    $content = "";
    $whats_new_box_counter = 0;
    $content .= '<marquee behavior= "scroll" align= "center" direction= "up" height="200px" scrollamount= "1" scrolldelay= "5" onmouseover='this.stop()' onmouseout='this.start()'><center>';
    while (!$random_whats_new_sidebox_product->EOF) {
    $whats_new_box_counter++;
    $whats_new_price = zen_get_products_display_price($random_whats_new_sidebox_product->fields['products_id']);
    $content .= '<div class="sideBoxContent centeredContent">';
    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_whats_new_sidebox_product->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($random_whats_new_sidebox_product->fields['master_categories_id']) . '&products_id=' . $random_whats_new_sidebox_product->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_whats_new_sidebox_product->fields['products_image'], $random_whats_new_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
    $content .= '<br />' . $random_whats_new_sidebox_product->fields['products_name'] . '</a>';
    $content .= '<div>' . $whats_new_price . '</div>';
    $content .= '</div>';
    $content .= '<br />';
    $random_whats_new_sidebox_product->MoveNextRandom();
    }

    $content .= '</center></marquee>';
    ?>

    这样就可以将里面的产品为滚动的,如果这样动不起来,可以将marquee里面的参数定意成变量,在里面调用就可以了!!!

  • 相关阅读:
    chrome插件收集
    每日进步一点点:偏函数的学习使用
    每日进步一点点:实现python的函数重载【打破相同函数名会被覆盖】
    stylus、scss的for和if写法对比
    MAC下JDK随意切换
    ssh设置超时时间
    kafkaTool工具使用
    kafka性能测试
    linx内存网络监控
    Mobaxterm使用
  • 原文地址:https://www.cnblogs.com/lookyou/p/2144163.html
Copyright © 2020-2023  润新知