|  | 
 
 楼主|
发表于 2025-9-6 15:24:37
|
显示全部楼层  IP:澳大利亚 
| 复制代码<style>
  #oBlk {
    margin-left: 50% ; left: -598px;
    margin-top:110px;
    width: 1210px;
    height: 640px;
    box-shadow: 3px 3px 10px #000;
    overflow: hidden;
    position: absolute;
  }
  #oBlk::before,
  #oBlk::after {
    position: absolute;
    content: '';
    left: var(--curX0);
    top: 0px;
    width: 100%;
    height: 100%;
    background: url('https://bbs.ltxjob.com/data/attachment/forum/202508/24/145736x3hp5lhpwhdex3cl.jpg.thumb.jpg') no-repeat center / cover;
  }
  #oBlk::after {
    left: var(--curX1);
    transform: scaleX(-1);
  }
</style>
<div id="oBlk"></div>
<div style="height:640px;"></div>
<script>
{
  let blkWidth = oBlk.offsetWidth;
  let step = 1.0, tune = 0, 
    curX0 = 0,
    curX1 = blkWidth,
    raf;
  let moving = () =>        {
/*    
        //自左向右
    curX0 += step;
    curX1 += step;
    if(curX0 >= blkWidth) curX0 = -blkWidth;
    if(curX1 >= blkWidth) curX1 = -blkWidth;
*/        
        //自右向左
    curX0 -= step;
    curX1 -= step;
    if(curX0 <= -blkWidth) curX0 = blkWidth;
    if(curX1 <= -blkWidth) curX1 = blkWidth;
    tune = curX1 + (curX0 >= 0 ? 1 : -1);
    oBlk.style.setProperty('--curX0', curX0 + 'px');
    oBlk.style.setProperty('--curX1', tune + 'px');
    raf = requestAnimationFrame(moving);
  };
  moving();
}  
</script></div></div><br><br><br><br><br><video autoplay="" controls="" height="1"
 src="https://link.hhtjim.com/163/1406642934.mp3" width="2">
 | 
 |