📄 osc_md.php
字号:
<!--// 向左滚动代码开始 -->
<style type="text/css">
body{margin:0px auto; padding:0px;}
ul,li{margin:0px; padding:0px;list-style:none;}
.sqBorder {width:778px; height:104px; padding:1px; border:1px #000000 solid; background:#5555ff;}
.scroll_div {width:770px; height:102px;margin:0 auto; overflow: hidden; white-space: nowrap; background:#ffffff;}
.scroll_div img {width:171px;height:100px;border: 0;margin: auto 1px; border:1px #efefef solid;}
#scroll_begin, #scroll_end, #scroll_begin ul, #scroll_end ul, #scroll_begin ul li, #scroll_end ul li{display:inline;}/*设置ul和li横排*/
</style>
<script language="javascript">
function ScrollImgLeft(){
var speed=20
var scroll_begin = document.getElementById("scroll_begin");
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else
scroll_div.scrollLeft++
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
}
</script>
<!-- <h2 align="center">向左滚动</h2> -->
<div style="text-align:center" align="center">
<div class="sqBorder">
<!-- #####滚动区域##### -->
<div id="scroll_div" class="scroll_div">
<div id="scroll_begin">
<ul>
<?php
## 门店数组 [0] [1] [2] [3] [4] [5]
$md[0] = array( '0','/modules/tinyd_a/index.php?id=14','南湖花园店','/modules/osC/images/default/mt0.png','南湖花园店-网上展示窗口','欢迎您到好想你枣南湖花园店购物');
$md[1] = array( '1','/modules/tinyd_a/index.php?id=15','京汉大道店','/modules/osC/images/default/mt1.png','京汉大道店-网上展示窗口','欢迎您到好想你枣京汉大道店购物');
$md[2] = array( '2','/modules/tinyd_a/index.php?id=16','江大路店','/modules/osC/images/default/mt2.png','江大路店-网上展示窗口','欢迎您到好想你枣江大路店购物');
$md[3] = array( '3','/modules/tinyd_a/index.php?id=17','傅家坡店','/modules/osC/images/default/mt3.png','傅家坡店-网上展示窗口','欢迎您到好想你枣傅家坡店购物');
$md[4] = array( '4','/modules/tinyd_a/index.php?id=18','大东门店','/modules/osC/images/default/mt4.png','大东门店-网上展示窗口','欢迎您到好想你枣大东门店购物');
$md[5] = array( '5','/modules/tinyd_a/index.php?id=19','杨汊湖店','/modules/osC/images/default/mt5.png','杨汊湖店-网上展示窗口','欢迎您到好想你枣杨汊湖店购物');
$md[6] = array( '6','/modules/tinyd_a/index.php?id=20','香江花园店','/modules/osC/images/default/mt6.png','香江花园店-网上展示窗口','欢迎您到好想你枣香江花园店购物');
$mdid = array('6','5','0','2','4','1','3');
for ( $i=0;$i<20;$i++) $abc[] = mt_rand(0,6);
$ab = array_unique($abc); $ac = array_diff($mdid,$ab); $md_uniq_rand = array_merge($ab,$ac);
## print_r($md);
## <li><a href="http://www.txdyz.com/modules/osC/product_info.php?products_id=48"><img src="<{$xoops_url}>/themes/<{$xoops_theme}>/logo/lipin/zaobos_470g.jpg" alt="绿色食品市场推广 - 在线订购" title="健康红枣极品-枣博士" /></a></li>
for ( $i=0; $i<count($md_uniq_rand); $i++ ) {
$xh = $md_uniq_rand[$i];
echo "<li><a target='_BLANK' href='{$xoops_url}".$md[$xh][1]."'><img src='{$xoops_url}".$md[$xh][3]."' alt='".$md[$xh][4]."' title='".$md[$xh][5]."' /></a></li>\n";
}
?>
</ul>
</div>
<div id="scroll_end"></div>
</div>
<!-- #####滚动区域##### -->
</div>
<script type="text/javascript">ScrollImgLeft();</script>
</div>
<!--// 向左滚动代码结束 -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -