简体   繁体   中英

How to dynamically update a page with images generated via php GD

Currently I am dynamically generating 1-(N) images via php GD based on user form input, and then posting into an iframe, that displays the image.

But theres a couple of problems:

  1. Iframes seems to be a drag when styling.
  2. The user dont seem to be able to "rightclick->saveas" the images properly when in iframes.

So are there any better methods for doing this?

Use a fixed size div element with overflow: scroll set on it.

For example:

#container {
    width: 600px;
    height: 300px;
    overflow-y: scroll; //vertical scrolling only
}

It behaves in the same manner as an iframe, but allows you better control of both content via javascript and styling via CSS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM