따라다니는 스크롤 문의좀 드립니다!!

따라다니는 스크롤 문의좀 드립니다!!

QA

따라다니는 스크롤 문의좀 드립니다!!

답변 2

본문

https://sir.kr/g5_tip/2660?sfl=wr_subject%7C%7Cwr_content&stx=%EB%B0%B0%EB%84%88이스킨사용중입니다

 


<!--
ver1.0 150421 @_untitle_d
http://untitled.untitle311apyxry1w48.com/5yj67ft
-->
 
<?php
 
$tmpWidth = '150';
$tmpMarginBottom = '5';
$tmpBorder = '0';
$arrL = array(
  array('#', '/img/mainimmg4.png', 'untitled' ,'_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg4.png', 'untitled', '_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg2.png', 'untitled', '_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg3.png', 'untitled', '_blank')
);
$arrR = array(
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled' ,'_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank'),
  array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg1.png', 'untitled', '_blank')
);
?>
 
<script type="text/javascript" src="<?php echo G5_JS_URL ?>/follower.js"></script>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
  $('#floatR').scrollFollower({
    pageAlign:'center',
    pageWidth:1220, //컨텐츠 블럭의 폭(필수값)
    type:'right',
    topMargin:200, //페이지 최상단과의 거리
    minTop:10,
    margin:5,
    speed:0,
    easing:'swing',
    zindex:0
  });
  $('#floatL').scrollFollower({
    pageAlign:'center',
    pageWidth:1220,
    type:'left',
    topMargin:200,
    minTop:10,
    margin:5,
    speed:0,
    easing:'linear',
    zindex:0
  });
});
//]]>
</script>
 
<div id="floatL">
<?php foreach($arrL as $v){ ?>
  <div style="margin-bottom:<?=$tmpMarginBottom?>px">
    <a href="<?=$v[0]?>" target="<?=$v[3]?>"><img src="<?=$v[1]?>" width="<?=$tmpWidth?>" border="<?=$tmpBorder?>" alt="<?=$v[2]?>"></a>
  </div>
  <?php } ?>
</div>

 
<div id="floatR">
<?php foreach($arrR as $v){ ?>
  <div style="margin-bottom:<?=$tmpMarginBottom?>px">
    <a href="<?=$v[0]?>" target="<?=$v[3]?>"><img src="<?=$v[1]?>" width="<?=$tmpWidth?>" border="<?=$tmpBorder?>" alt="<?=$v[2]?>"></a>
  </div>
  <?php } ?>
</div>

 

이 스킨을 사용해서 따라다니는 스크롤을 이용하고 있는데 array('http://untitled.untitle311apyxry1w48.com/', '/img/mainimmg4.png', 'untitled', '_blank'),

여기부분에 이미지 말고 div로 감싸서 텍스트나 박스같은걸 출력하고 싶은데 가로부분안에 코드를 어떤식으로 써야지 되는걸까여,,?공부중이라 아무리 검색해봐도 모르겠네여ㅠㅠ바쁘실텐데 알려주시면 감사하겠습니다!ㅠㅠ

이 질문에 댓글 쓰기 :

답변 2

※ 수정된 코드 ~ xxx.php


<?php
$tmpWidth = '150';
$tmpMarginBottom = '5';
$tmpBorder = '0';
$arrL = array(
  array('#', '텍스트 콘텐츠 L1', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 L2', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 L3', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 L4', '_blank')
);
$arrR = array(
  array('http://example.com', '텍스트 콘텐츠 R1', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 R2', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 R3', '_blank'),
  array('http://example.com', '텍스트 콘텐츠 R4', '_blank')
);
?>
<div id="floatL">
<?php foreach($arrL as $v){ ?>
  <div style="margin-bottom:<?=$tmpMarginBottom?>px; border:1px solid #ddd; padding:10px; width:<?=$tmpWidth?>px;">
    <a href="<?=$v[0]?>" target="<?=$v[2]?>"><?=$v[1]?></a>
  </div>
<?php } ?>
</div>
<div id="floatR">
<?php foreach($arrR as $v){ ?>
  <div style="margin-bottom:<?=$tmpMarginBottom?>px; border:1px solid #ddd; padding:10px; width:<?=$tmpWidth?>px;">
    <a href="<?=$v[0]?>" target="<?=$v[2]?>"><?=$v[1]?></a>
  </div>
<?php } ?>
</div>

<a href="<?=$v[0]?>" target="<?=$v[3]?>"><img src="<?=$v[1]?>" width="<?=$tmpWidth?>" border="<?=$tmpBorder?>" alt="<?=$v[2]?>"></a>

=>
<a href="<?php echo $v[0]?>" target="<?php echo $v[3]?>"><div title="<?php echo $v[2]?>" style="width:120px;height:100px"><?php echo $v[2]?></div></a>

이런식으로 수정하면 되것 같네요.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 145
© SIRSOFT
현재 페이지 제일 처음으로