해결이 안되서 링크해서 다시 문의드립니다. ㅠㅠ
관련링크
본문
해결이 안되서 링크해서 다시 문의드립니다. ㅠㅠ
해당스킨을 사용해서 만들었는데요
사이트 열면 첫번째 꽃 이미지가 나와야하는데 네번째 이미지가 나오네요 ㅠㅠ
사이트에서 요소보기 클릭하면 순서는 첫번째로 되있는데 왜이런걸까요 ㅠㅠ
도움부탁드립니다.
아래는 해당 소스입니다.
-------latest.skin.php파일----------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$ym = date("ym", $g4[server_time]);
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
//코멘트와 리플글은 제외
$sql = " select * from $tmp_write_table
where wr_comment = '' and wr_reply = ''
order by wr_id DESC LIMIT 0, 1 ";
$result = sql_query($sql);
$last_con = sql_fetch_array($result);
?>
<meta http-equiv="content-type" content="text/html; charset=<?=$g4['charset']?>">
<!-- ----------------------------------------------------------------------------- -->
<link href="<?=$latest_skin_path?>/css/archefoucs.css" rel="stylesheet" />
<script src="<?=$latest_skin_path?>/js/archefoucs.js" type="text/javascript"></script>
<!-- ----------------------------------------------------------------------------- -->
<!-- un tab slides start -->
<div class="header">
<div class="gg" id="gg">
<div class="ggLoading">
<div class="ggLoading2"><em>로딩중입니다....</em></div>
</div>
<div class="ggs">
<div class="ggBox" id="ggBox">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i][wr_link1];
?>
<a href='<?=$link?>' target="_blank" title="" style="z-index: 3; opacity: 4;">
<img src="<?=$slides_img?>" alt="" /></a>
<? }?>
<!-- <a href="#" target="_blank" title="">
<img src="images/2.jpg" alt="" /></a>
<a href="#" target="_blank" title="">
<img src="images/3.jpg" alt="" /></a>
<a href="#"" target="_blank" title="">
<img src="images/4.jpg" alt="" /></a>-->
</div>
</div>
<div class="ggb">
<div class="ggBtns" id="ggBtns">
<?
// 별도의 썸네일 생성 없이 원본파일을 그대로 사용했습니다.
for ($i=0; $i<count($list); $i++) {
$slides_img = "$data_path/".urlencode($list[$i][file][0][file]);
$link = $list[$i][wr_link1];
?>
<a title="" href='javascript:void(0)' class="<? if ($i == 0) echo "ggOn"; ?>"><em><?=$list[$i][subject]?></em></a>
<? }?>
</div>
</div>
</div>
</div>
<!-- ----------------------------------------- -->
<? if (count($list) == 0) { ?> 이미지가 없습니다. <?}?>
-----------js파일----------------------------------
$(function () {
var $con = $('#gg'), $box = $con.find('#ggBox'), $btns = $con.find('#ggBtns'), i = 0, autoChange = function () {
i += 1;
if (i === 4) { i = 0; }
$btns.find('a:eq(' + i + ')').addClass('ggOn').siblings().removeClass('ggOn');
var curr = $box.find('a:eq(' + i + ')'), prev = curr.siblings();
prev.css('z-index', 2);
curr.css('z-index', 3).animate({
'opacity': 1
}, 150, function () {
prev.css({
'z-index': 1, 'opacity': 0.1
});
});
}, loop = setInterval(autoChange, 5000);
$con.hover(function () {
clearInterval(loop);
}, function () {
loop = setInterval(autoChange, 5000);
});
$btns.find('a').click(function () {
i = $(this).index() - 1;
autoChange();
});
});
------사용된css---------------
body { margin: 0; padding: 0; }
body { font: normal 12px 微软雅黑; }
a { text-decoration: none; }
img { border: 0; }
em { font-style: normal; font-weight:bold; }
a { text-decoration: none; color: #6c6c6c; }
a:hover { color: #ff4200; }
body { min-width: 761px; color: #6c6c6c; }
.header { width: 761px; margin: 0 auto; position: relative; }
.ggLoading, .ggLoading2 { background-image: url(../images/nav.png); }
.header { height: 246px; }
.gg { width: 100%; height: 246px; position: relative; z-index: 1; overflow: hidden; margin: 0 auto; background: #d3d3d3 url(../images/loading.jpg) repeat-x; }
.ggLoading { position: absolute; left: 40%; top: 200px; width: 325px; text-align: center; height: 56px; background-position: 0 -274px; background-repeat: no-repeat; line-height: 56px; color: #9c9c9c; }
.ggLoading2 { width: 330px; height: 56px; background-position: 213px -330px; background-repeat: no-repeat; }
.ggLoading em { font-weight: bold; }
.ggs { width: 200%; height: 246px; left: -50%; top: 0; position: absolute; }
.ggBox { width: 761px; height: 246px; margin: 0 auto; }
.ggBox a { display: block; width: 761px; height: 246px; position: absolute; z-index: 1; opacity: 0.1; }
.ggBox img { display: block; width: 761px; height: 246px; }
.ggb { position: absolute; width: 100%; left: 0; bottom: 0; height: 34px; z-index: 4; background-repeat: repeat-x; background-position: 50% -40px; }
.ggBtns { width: 960px; height: 40px; margin: 0 auto; border-left: 1px solid #090908; border-right: 1px solid #6a6a60; }
.ggBtns a { float: left; display: block; width:192px; height: 34px; text-align: center; padding-top: 10px; color: #ffffff; font-weight:bold; font-size: 12px; line-height: 40px; background-position: 0 10px; position: relative; top: -10px; outline: none; background-repeat: no-repeat; cursor: pointer; }
.ggBtns a em { display: block; width: 192px; height: 34px; margin: 0 auto; overflow: hidden; }
.ggBtns a:hover { color: #e7e7e7; }
.ggBtns a:focus { outline: none; }
.ggBtns a.ggOn { color: #e7e7e7; background-position: 0 0; }
.ggb, .ggBtns a { background-image: url(../images/main.png); }
a.ggOn { background-image: url(../images/gg.png); }
답변 1
z-index: 3
이렇게 되어 있어서 그런것 같은데요
모든 이미지의 z-index가 3이면 맨 마직 이미지가 위로 올라오게 되니가요
이녀석들을
<?
$j=count($list);
for ($i=0; $i<count($list); $i++) {
?>
<a href='<?=$link?>' target="_blank" title="" style="z-index: <?=$j?>; opacity: 4;">
<?
$j--;
}
?>
이런식으로 한번 해보세요