php - 上传区域设置为 "overflow:hidden",如何上传所有图片?

标签 php html css

我尝试在不使用任何库的情况下编写图片库。我想将 14 个 jpg 文件作为“uniq_image”实例上传到普通图像“moving_image”中。我只成功上传了3个jpg文件的错误,因为在css中为'td'类设置了“溢出:隐藏”。

CSS文件:

//the common long horizontal image that I want to assemble from uniq_images
#moving_image  {
    background-repeat: no-repeat; 
    position: relative;
    border:1px dashed red;
    width: 420px;
    height: 130px;
    left: 10px;
}
//the style for each uploaded image from the file
.uniq_image {
    background-repeat: no-repeat;
    border:1px solid gray;
    width: 120px;
    height: 80px;
    margin: 5px 25px 5px 25px;
    padding:2px
    overflow:hidden;
}
//I set it because I have to fix the cell size
td {
    overflow:hidden;
}

html代码:

....
<td width ="420" height="130" overflow="hidden">
     <div id= "moving_image" >
             <?php
                  $img_folder = 'picture';
                  $dir = dir($img_folder);
                  while (($file = $dir->read()) !== false){
                      echo '<img src="'.$img_folder."/".$file.'" class="uniq_image" >';              
                  $dir->close();
              ?>
      </div>
<td>

那么,如何修复这个错误并将所有图像上传到“moving_image”?谢谢。

最佳答案

我解决了这个问题。我补充说:

margin-left:-2000px;
width:2000px;

对“moving_image”的定义。

关于php - 上传区域设置为 "overflow:hidden",如何上传所有图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9040674/

相关文章:

php - 使用 mysql 和 php 仅返回一次月份和日期

javascript - 如何将js鼠标坐标获取到php插入查询中?

javascript - 堆栈栏的方向和适当的大小

javascript - 是否可以在另一个 GA 属性中记录 PDF 下载?

php - Laravel 在自定义验证规则上附加规则

html - CSS,覆盖所有选择下拉菜单的高度?

javascript - 从 href 链接链接到特定选项卡

css - 页面在窗口模式下无法正确缩放

html - 如何更改导航栏文本后面的背景颜色和高度?

html - CSS - 覆盖 div 高度 :100% including scroll area is not working