需要一些帮助才能在html网站上显示图像。 [英] Need a little help for showing up images on an html website.

查看:78
本文介绍了需要一些帮助才能在html网站上显示图像。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个带有一些js的简单网站,我有一个任务就是制作一个简单的页面,只是为了正确显示一些图像,缩略图(带有统一图标)一个接一个地对齐。



就像你在主页上点击菜单栏上的照片标签一样,它会打开一个新页面(例如images.html),显示所有这些摄影照片一个接一个地阻止缩略图。

你将鼠标悬停在它们上面,单击将弹出该缩略图以查看更大的尺寸(正如js所做的那样)。

剪切该图像,打开另一个等等。





主要问题是那里的图像会在每日基础上改变(客户需要它那样他实际上想要每天上传剪纸扫描照片。

意味着如果有50块可以显示50张图片,他每天会放50张图片。



如果他每天都要上传文件(重新命名新文件并覆盖prev每天在html页面上显示图像和更改图像路径。这不是他想要的东西)



每天最好,最简单,最可靠的方式是什么。



如果他今天需要50张新图像,他会将这些图像上传到一个文件夹中,并自动显示在这些缩略图中。



注意:他想要改变每日图像。

I am working on a simple website with some js too and i got a task to make a a simple page which is only for showing up few images properly with thumbnails(with a uniform icon) aligned one after another.

Its something like you're on homepage and you click "photos" tab on menu bar, it opens a new page (say, images.html) which shows up all those photography photo blocks thumbnails one after another.
You hover onto them, clicking will pop up that thumbnail to see the bigger size (just what js does).
Cut that image, open another and so on.


The main problem is that the images in there will be changed on daily basic (client needs it to be that way) and he actually wants to upload paper cutting scanned photos everyday.
Means if there are 50 blocks to show 50 images, he's going to put 50 images everyday.

If he gonna upload files everyday (renaming new ones and overwrite previous images and changing paths of images on html page everyday. thats not what he wants)

What is the best, easy and reliable way to that everyday.

Just if he needs 50 new images for today, he upload those images in a folder and they are showing up in these thumbnails automatically.

Note: He wants to change images everyday.

推荐答案

从您的图像列表(可能来自服务器端文件夹[可能与scandir()]并使用您的列表填充php生成的图像(循环中)



From your list of images (perhaps from a server-side folder [perhaps with scandir() ] and use your list to populate php-generated images (in a loop)

foreach(


imgFile as


img)
ECHO < img src =
img) ECHO "<img src="


这篇关于需要一些帮助才能在html网站上显示图像。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆