2013-04-12 51 views
0

嗨,我正在開發iPhone手機網站(而不是應用程序)。iPhone功能與圖像,點擊縮略圖和顯示大圖像

這是一個真正的noob問題,雖然我已經搜索並沒有真正找到了我期待的,因爲我不知道該用哪個具體的搜索字詞。

在iPhone當你點擊它在屏幕上顯示該圖像放大的圖像,因此您可以放大/縮小。

我使用生成的縮略圖是比原始圖像小了很多,我怎麼在全resoloution圖像加載被點擊縮略圖的時候?

再次爲noob問題抱歉,如果有人可以指出我在正確的方向,部分問題是我沒有手機網站或iPhone功能的經驗,我會繼續玩jquery mobile,看看我在哪裏接着就,隨即。

+0

你只是想用''? – Omar

+0

yes but when its clicked i want to show the image full-screen but an alternate high rs image, not the thumbnail that was clicked. –

+0

What you could do, is create a new page dynamically and add an image to it. i'll work on an example for you. – Omar

回答

1

當你點擊縮略圖,你可以將用戶重定向到一個又一個HTML頁面,是包括具有最大寬度和最大高度在%的圖像。

在移動,最好有一個以%表示設計可言的手機屏幕相適應的設計。

<img src="myImage.jpg" alt="myImage" id="myImg" /> 

而且在CSS

#myImg{ 
max-height:100%; 
max-width: 100%; 
} 

你有其他的解決方案,通過使用jQuery插件太:http://fancybox.net/

+0

Thanks for your reply, Raphael, that points me in the right direction, so when an image is clicked, its like a hyperlink to the image, i in fact was going to start looking at jQuery mobile, i use standard jQuery a lot, so should be nice to work with. In your code you have myImage.jpg as the source, i would have myImageThumb.jpg as the souve (my thumbnail image) then when the image is clicked i want to go to the full size image myImageFull.jpg not the low res thumbnail image... –

+0

I think, you have to do that : first : '' 你會去正常顯示圖像myImg.html: 'myImage' 它會是這樣的好,我認爲。 –