【问题标题】:How to overlap one image over another?如何将一张图像重叠在另一张图像上?
【发布时间】:2010-08-02 15:25:52
【问题描述】:

在我的应用程序中,我正在显示用户相册图像的缩略图。我想要做的是在相册图像的右上角显示一个delete 图像按钮over。当用户单击删除图像时,它将通过图像ID并从数据库中删除图像信息。我的问题是如何在album image上重叠delete image? 删除图像是一个 30*30 的小 gif 图像。 我正在动态生成图像块 -

<div id="main">

<?php require 'getPhotos.php'; ?>
</div>

getPhotos.php-

...
if ($result) {

echo "<ul id='photos'> \n";

while ($row = $result->fetch_object()) {

    $title = $row->title;
    $src = $row->src;
    $id = $row->id;

    echo "<li><a href='images/$src'><img src='images/$src' width='90%' height='60%' id='$id' alt='$title' /></a> \n";
    echo "<h4>$title</h4> \n";
    echo "<input type='text' name='title' value='$title' /></li> \n \n";
    }   

    echo "</ul>";   

}
...

【问题讨论】:

    标签: html css image


    【解决方案1】:

    您可以使用 css 和 div 将图像重叠/重叠

    这是一篇解释您需要做什么的文章。

    http://chadcarr.com/blog/simple-overlay-image-captions-css/

    【讨论】:

      猜你喜欢
      • 2011-01-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-22
      • 2014-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多