이미지 갤러리에 글을 쓸 수 있으며 라이브러리를 사용하지 않습니다. 특정 디렉토리에서 jpg 파일을 업로드합니다.jpg 파일을 하나의 일반적인 긴 가로 이미지로 업로드하려면 어떻게해야합니까?
//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;
overflow:hidden;
}
//the style for each uploaded image from the file
#uniq_image {
background-repeat: no-repeat;
border:1px solid blue;
width: 150px;
height: 120px;
overflow:hidden;
}
그 안에 PHP를 업로드 코드와 HTML 파일 :
나는 함께CSS 파일을들을 스크롤하기 위해 하나 개의 긴 수평 이미지 "moving_image"에 업로드 "uniq_image"이미지를 조립합니다
....
<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.'" style="uniq_image" >';
}
$dir->close();
?>
</div>
<td>
여기에 무엇이 있습니까? 감사.
안녕하세요 Alin Purcaru입니다. 당신 말이 맞아요, 고마워요. 그것은 훨씬 나아 보이지만, 여전히 작은 문제가 있습니다. "moving_image"에는 "uniq_images"가 업로드 된 부분 만 있습니다. 14 개의 이미지 대신 "moving_image"에는 5 개 밖에 없습니다. "moving_image"정의에서 "overflow : hidden"을 제거했지만 여전히 버그가 있습니다. 5 개가 아닌 모든 이미지를 어떻게 삽입 할 수 있습니까? –
@ tatiana_c'td'에도'overflow = hidden'이 있습니다. –
나는 또한 그것에주의했다. 그러나 "td"정의에서 "overflow : hidden"을 제거하면 이미지가 셀에 랩핑되지 않고 셀 크기가 420px가 아니라 거대합니다. –