dtdt0454 2016-09-11 15:46
浏览 57

递归读取文件夹中的名称文件,然后在html文件中创建新的拇指

I'm very new to html, php and js so maybe this could seem a dumb question... please help anyway :)

This is the scenario:

  • I have a folder that contains some image files.
  • I have a html page were I want to display those files.

I'd like not to manually repeat the same command for each image, but to have something tha does it for me.

In my html there is something like this:

<div class="portfolio">
  <div class="pick-my-image">
    <a href="cool_bag.html" class="thumb-overlay"> <!-- html page should be created automatically -->
      <img src="myfolder/cool_bag.jpg"> <!-- this file name should be picked up automatically -->
    </a>
   </div>
   <div class="portfolio-description">
     <a href="cool_bag.html">
       <h6>Cool things</h6>
       <h5 class="portfolio-name" ><strong>Cool bag</strong></h5><!-- This should be the name of the image. Actually I don't know how to generate it  -->
     </a>
     </div>
</div>

This code generates a thumbnail in a portfolio gallery page. Every thumbnail, if clicked, should redirect to its page (cool_bag.html in this case)

Thanks to all that will answer!

Stef

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 聚类分析或者python进行数据分析
    • ¥15 逻辑谓词和消解原理的运用
    • ¥15 三菱伺服电机按启动按钮有使能但不动作
    • ¥15 js,页面2返回页面1时定位进入的设备
    • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
    • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
    • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
    • ¥20 腾讯企业邮箱邮件可以恢复么
    • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
    • ¥15 错误 LNK2001 无法解析的外部符号