I'm using the jQuery Mobile Framework to develop a website for phones, and there are some images on the site that I want to open up in a larger format in the Dialog control.
I have a page setup that handles loading the image where the image is in a div with overflow=auto. It works on a desktop browser (Chrome), where if I shrink the window down, the dialog has scroll bars internally for the image. It doesn't work however on my phone's browser (Android, so Chrome browser). The div doesn't want to scroll. Is there any way I can circumvent this, aside from shrinking the image down?
Here's the code for the image page:
<div data-role="dialog">
<div data-role="header" data-theme="d" data-position="inline">
<h1><%= ViewData["ImageTitle"] %></h1>
</div>
<div data-role="content开发者_StackOverflow中文版" data-theme="c">
<div style="overflow:auto;">
<img alt="<%= ViewData["ImageAlt"] %>"
src="<%= ViewData["ImageUrl"] %>" />
</div>
</div>
</div>
How to get the scroll bar with CSS overflow on iOS
Sounds like you want a "lightbox" type of plugin. Check this out: best jquery-based lightbox / popup dialogbox? or http://www.designyourway.net/blog/resources/30-efficient-jquery-lightbox-plugins/
Pretty sure these plugins should work just fine in a mobile environment.
精彩评论