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里面的参数定意成变量,在里面调用就可以了!!!

  • 相关阅读:
    微信小程序开发教程目录
    Head First设计模式之目录
    CentOS安装NodeJS
    docker镜像打包
    .net core 2.2部署到Windows Server 2012 R2 standard
    MySQL job/定时任务/event 学习
    “sgen.exe”未能运行。文件名或扩展名太长
    Linux 服务器如何设置文件和文件夹的读写权限
    添加“Git Bash Here”到右键菜单
    .Net Core中文编码问题
  • 原文地址:https://www.cnblogs.com/lookyou/p/2144163.html
Copyright © 2011-2022 走看看