zoukankan      html  css  js  c++  java
  • 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里面的参数定意成变量,在里面调用就可以了!!!

  • 相关阅读:
    js中return的作用
    jstl标签详解总结
    css——overflow属性用法
    oracle数据批处理
    SQL Server 2000/2005 分页SQL — 单条SQL语句
    dataset和实体类 之间的转换
    barmanager设置
    C#集合类(HashTable, Dictionary, ArrayList)与HashTable线程安全
    comboboxEdit 不能输入,只能选择
    C#在父窗口中调用子窗口的过程(无法访问已释放的对象)
  • 原文地址:https://www.cnblogs.com/lookyou/p/2144163.html
Copyright © 2011-2022 走看看