返回列表 發帖
當然可以壓
由於外部IP被公司封了~所以....
我再找找看有沒有可以讓我放檔案的網路空間
不好意思啦ㄚ_ㄚ

還是說我把我目前的成果直接打包一份給您
http://home.anet.net.tw/bau0123/all.rar
直接點兩下HTML檔就可以執行了
這樣好嗎

[ 本帖最後由 bau720123 於 2009-4-17 17:12 編輯 ]
邁向神乎其技的境界^^

TOP

哦,我猜是因為靠右的話,相片變成 absolute 的排版後沒有佔位置,所以負責控制的那一行就跑上去了,應該是這樣~~

所以如果要靠右的話,那麼可能連那一行的位置都要跟著調整。你有網址可以讓我直接看目前的成果嗎?
To infinity and beyond!

TOP

感謝您的指導
更改之後果然出現位置以靠右顯示了
CSS碼如下~分享給需要的人~其中紅色字體的部分是照您說的改的

litebox版本
#lightbox{        position: absolute;        left: 0; width: 100%; z-index: 100; text-align: center; line-height: 0;}
#lightbox img{ width: auto; height: auto;}
#lightbox a img{ border: none; }

#outerImageContainer{ position: absolute; background-color: #fff; width: 250px; height: 250px; margin: 0; right:0; }

#imageContainer{ padding: 10px; }

#loading{ position: absolute; top: 40%; left: 0%; height: 25%; width: 100%; text-align: center; line-height: 0; }
#hoverNav{ position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
#imageContainer>#hoverNav{ left: 0;}
#hoverNav a{ outline: none;}

#prevLink, #nextLink{ width: 49%; height: 100%; background-image: url(data:image/gif;base64,AAAA); /* Trick IE into showing hover */ display: block; }
#prevLink { left: 0; float: left;}
#nextLink { right: 0; float: right;}
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }

#imageDataContainer{ position: absolute;font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; margin: 0; line-height: 1.4em; overflow: auto; width: 100%; right:0; }

#imageData{        padding:0 10px; color: #666; }
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }       
#imageData #caption{ font-weight: bold;        }
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em;        }                       
#imageData #bottomNavClose{ width: 66px; float: right;  padding-bottom: 0.7em; outline: none;}                

#overlay{ position: absolute; top: 0; left: 0; z-index: 90; width: 100%; height: 500px; background-color: #000; }

lytebox版本
#lbOverlay { position: fixed; top: 0; left: 0; z-index: 99998; width: 100%; height: 500px;}
        #lbOverlay.grey { background-color: #000000; }
        #lbOverlay.red { background-color: #330000; }
        #lbOverlay.green { background-color: #003300; }
        #lbOverlay.blue { background-color: #011D50; }
        #lbOverlay.gold { background-color: #666600; }

#lbMain { position: absolute; left: 0; width: 100%; z-index: 99999; text-align: center; line-height: 0; }
#lbMain a img { border: none; }

#lbOuterContainer { position: absolute; background-color: #fff; width: 250px; height: 250px; margin: 0; right:0; }
        #lbOuterContainer.grey { border: 3px solid #888888; }
        #lbOuterContainer.red { border: 3px solid #DD0000; }
        #lbOuterContainer.green { border: 3px solid #00B000; }
        #lbOuterContainer.blue { border: 3px solid #5F89D8; }
        #lbOuterContainer.gold { border: 3px solid #B0B000; }

#lbDetailsContainer {        position: absolute;font: 10px Verdana, Helvetica, sans-serif; background-color: #fff; width: 100%; line-height: 1.4em;        overflow: auto; margin:0; right:0; }
        #lbDetailsContainer.grey { border: 3px solid #888888; border-top: none; }
        #lbDetailsContainer.red { border: 3px solid #DD0000; border-top: none; }
        #lbDetailsContainer.green { border: 3px solid #00B000; border-top: none; }
        #lbDetailsContainer.blue { border: 3px solid #5F89D8; border-top: none; }
        #lbDetailsContainer.gold { border: 3px solid #B0B000; border-top: none; }

#lbImageContainer, #lbIframeContainer { padding: 10px; }
#lbLoading {
        position: absolute; top: 45%; left: 0%; height: 32px; width: 100%; text-align: center; line-height: 0; background: url(images/loading.gif) center no-repeat;
}

#lbHoverNav { position: absolute; top: 0; left: 0; height: 100%; width: 100%; z-index: 10; }
#lbImageContainer>#lbHoverNav { left: 0; }
#lbHoverNav a { outline: none; }

#lbPrev { width: 49%; height: 100%; background: transparent url(images/blank.gif) no-repeat; display: block; left: 0; float: left; }
        #lbPrev.grey:hover, #lbPrev.grey:visited:hover { background: url(images/prev_grey.gif) left 15% no-repeat; }
        #lbPrev.red:hover, #lbPrev.red:visited:hover { background: url(images/prev_red.gif) left 15% no-repeat; }
        #lbPrev.green:hover, #lbPrev.green:visited:hover { background: url(images/prev_green.gif) left 15% no-repeat; }
        #lbPrev.blue:hover, #lbPrev.blue:visited:hover { background: url(images/prev_blue.gif) left 15% no-repeat; }
        #lbPrev.gold:hover, #lbPrev.gold:visited:hover { background: url(images/prev_gold.gif) left 15% no-repeat; }
       
#lbNext { width: 49%; height: 100%; background: transparent url(images/blank.gif) no-repeat; display: block; right: 0; float: right; }
        #lbNext.grey:hover, #lbNext.grey:visited:hover { background: url(images/next_grey.gif) right 15% no-repeat; }
        #lbNext.red:hover, #lbNext.red:visited:hover { background: url(images/next_red.gif) right 15% no-repeat; }
        #lbNext.green:hover, #lbNext.green:visited:hover { background: url(images/next_green.gif) right 15% no-repeat; }
        #lbNext.blue:hover, #lbNext.blue:visited:hover { background: url(images/next_blue.gif) right 15% no-repeat; }
        #lbNext.gold:hover, #lbNext.gold:visited:hover { background: url(images/next_gold.gif) right 15% no-repeat; }

#lbPrev2, #lbNext2 { text-decoration: none; font-weight: bold; }
        #lbPrev2.grey, #lbNext2.grey, #lbSpacer.grey { color: #333333; }
        #lbPrev2.red, #lbNext2.red, #lbSpacer.red { color: #620000; }
        #lbPrev2.green, #lbNext2.green, #lbSpacer.green { color: #003300; }
        #lbPrev2.blue, #lbNext2.blue, #lbSpacer.blue { color: #01379E; }
        #lbPrev2.gold, #lbNext2.gold, #lbSpacer.gold { color: #666600; }
       
#lbPrev2_Off, #lbNext2_Off { font-weight: bold; }
        #lbPrev2_Off.grey, #lbNext2_Off.grey { color: #CCCCCC; }
        #lbPrev2_Off.red, #lbNext2_Off.red { color: #FFCCCC; }
        #lbPrev2_Off.green, #lbNext2_Off.green { color: #82FF82; }
        #lbPrev2_Off.blue, #lbNext2_Off.blue { color: #B7CAEE; }
        #lbPrev2_Off.gold, #lbNext2_Off.gold { color: #E1E100; }
       
#lbDetailsData { padding: 0 10px; }
        #lbDetailsData.grey { color: #333333; }
        #lbDetailsData.red { color: #620000; }
        #lbDetailsData.green { color: #003300; }
        #lbDetailsData.blue { color: #01379E; }
        #lbDetailsData.gold { color: #666600; }

#lbDetails { width: 60%; float: left; text-align: left; }
#lbCaption { display: block; font-weight: bold; }
#lbNumberDisplay { float: left; display: block; padding-bottom: 1.0em; }
#lbNavDisplay { float: left; display: block; padding-bottom: 1.0em; }

#lbClose { width: 64px; height: 28px; float: right; margin-bottom: 1px; }
        #lbClose.grey { background: url(images/close_grey.png) no-repeat; }
        #lbClose.red { background: url(images/close_red.png) no-repeat; }
        #lbClose.green { background: url(images/close_green.png) no-repeat; }
        #lbClose.blue { background: url(images/close_blue.png) no-repeat; }
        #lbClose.gold { background: url(images/close_gold.png) no-repeat; }

#lbPlay { width: 64px; height: 28px; float: right; margin-bottom: 1px; }
        #lbPlay.grey { background: url(images/play_grey.png) no-repeat; }
        #lbPlay.red { background: url(images/play_red.png) no-repeat; }
        #lbPlay.green { background: url(images/play_green.png) no-repeat; }
        #lbPlay.blue { background: url(images/play_blue.png) no-repeat; }
        #lbPlay.gold { background: url(images/play_gold.png) no-repeat; }
       
#lbPause { width: 64px; height: 28px; float: right; margin-bottom: 1px; }
        #lbPause.grey { background: url(images/pause_grey.png) no-repeat; }
        #lbPause.red { background: url(images/pause_red.png) no-repeat; }
        #lbPause.green { background: url(images/pause_green.png) no-repeat; }
        #lbPause.blue { background: url(images/pause_blue.png) no-repeat; }
        #lbPause.gold { background: url(images/pause_gold.png) no-repeat; }


但改完後出現一個比較不是那麼完美的地方
請見圖片--上方CLOSE那一排本應該在相片框的下方顯示--但現在莫名的跑到上方了^^|||(我嘗試很多方法~調整CSS都沒辦法使齊在原來的位置)


[ 本帖最後由 bau720123 於 2009-4-16 16:45 編輯 ]
邁向神乎其技的境界^^

TOP

這類的展示特效通常都是置中的沒錯。

你可以用 Firebug 之類的軟體觀察,以你提供的 litebox 來說,他是先用一層 div 叫 lightbox 這邊控制上邊界,再包一層 div 控制置中,因此你只要把置中的這個 div 調整一下即可。

置左,原本是 margin: 0 auto,改為:
#outerImageContainer {
  margin: 0;
}
#imageDataContainer {
  margin: 0;
}
如果要置右的話,postion 原本是 relative 要改成 absolute,再把 right 設成 0。

大致是這樣,不過不確定是否特效都會很完美,畢竟原本設計是置中的。
To infinity and beyond!

TOP

我是小包
我又來發問了
算是一個CSS的問題
Lytebox的確蠻好用的
我也用過另外一種叫做litebox
就是您指的那個啦
http://www.doknowevil.net/litebox/

但兩者執行時--相片框都會預設在中間的位置--
請問要怎麼改成靠右或靠左的位置呢??
我嘗試過改過CSS
使用過margin設定text-align設定
都沒辦法使它改變對齊方向^^|||

[ 本帖最後由 bau720123 於 2009-4-14 19:09 編輯 ]
邁向神乎其技的境界^^

TOP

返回列表 回復 發帖