2013-05-09 28 views
0

我是網絡開發新手,我需要爲投資組合目的創建一個網站,其中我需要顯示縮略圖和我的項目下方的一些描述,並且應該動態顯示所有內容。我擁有PHP,wordpress,javascript,jquery,python和HTML/CSS的基本知識,所以這是我爲學習目的而做的。需要創建動態縮略圖網格。

我想請你們告訴我,我該怎麼做,只是引導我休息一下,我會處理。

一些類似的例子是

http://themes.themepunch.com/?theme=megafoliopro_jq

http://codecanyon.net/item/dzs-scroller-gallery-cool-jquery-media-gallery/full_screen_preview/457913?ref=ibrandstudio

我是新來這個論壇,並希望有人會回答我的問題

非常感謝隊友。

+1

'我是這個論壇的新手,希望有人會回答我的問題< - 什麼?請先付出一些努力:) – 2013-05-09 13:08:10

+0

你有它倒退,我們不告訴你要走的路,我們在你開始後的路上幫助你。 – Pitchinnate 2013-05-09 13:10:16

+0

給我們魚,而不是釣魚竿。 – Cam 2013-05-09 13:11:27

回答

0

你可以用​​3210一個目錄來生成使用PHP的縮略圖。我用我的攝影網站這種方法:

<?php 
$counter = 0; // Set counter to 0 
foreach (glob("images/photo-strip/thumb/*.jpg") as $pathToThumb) { // Grab files from the thumbnail path and save them to variable 
    $th_filename = basename($pathToThumb); // Strip the thumbnail filename from the path 
    $filename = str_replace('th_', '', $th_filename); // Strip th_ from the filename and save it to a different variable 
    $pathToFull = 'images/photo-strip/' . $filename; // Rebuild the path to the full-size image 
    echo ("<section class=\"photo-box\"><a href=\"$pathToFull\"><img src=\"$pathToThumb\" /></a></section>"); // Echo the photobox 
    $counter++; // Increment counter by 1 until no file exists 
} 
?> 

你可以對這個代碼的一些,以生成你的「字幕」擴大甚至可能是你的風格字幕關閉<img>標籤內title=""屬性。如何將這些標題與文件相匹配取決於您。