Php 如何使div保持固定并移动div';在悬停状态下,它的两边都在
我有一个PHP查询,可以查询志愿者的姓名和详细信息。这些图像从左到右显示为缩略图。悬停时,它们使用css显示细节Php 如何使div保持固定并移动div';在悬停状态下,它的两边都在,php,css,Php,Css,我有一个PHP查询,可以查询志愿者的姓名和详细信息。这些图像从左到右显示为缩略图。悬停时,它们使用css显示细节 <?php while($fetch = $result->fetch_assoc()) { $Name =str_replace('-',' ',$fetch['Name']); $About =str_replace('-',' ',$fetch['About']); $id = $fetch['id']; $Thumb = $fetch['Thumb
<?php while($fetch = $result->fetch_assoc()) {
$Name =str_replace('-',' ',$fetch['Name']);
$About =str_replace('-',' ',$fetch['About']);
$id = $fetch['id'];
$Thumb = $fetch['Thumbnail'];
$class++;
if ($class == $max) {
$class =0;
}
if ($class > 5) {
$id = ("thumbnail_r"); //changes to id so the thumb floats right
}
else if($class < 6) {
$id = ("thumbnail_l");//changes to id so the thumb floats left
}
?>
<div id="thumb_w"><p><?php echo '<img src="staff/'.$Thumb.'" alt="'.$Name.'" width="100px" height="100px" id="'.$id.'"/>';?>
<?php echo $Name?>
<?php echo $About?></p>
</div>
<?php
}
} else {
echo "0 results";
}
是否有一种方法可以使您悬停的缩略图保持固定,而所有其他缩略图都会滑开。它不必是css,这正是我所习惯的 使用jQuery mouseenter和mouseleave方法
$( selector ).mouseenter( handlerIn ).mouseleave( handlerOut );
也可以使用悬停方法
$( selector ).hover( handlerIn, handlerOut )
这是参考资料
$( selector ).hover( handlerIn, handlerOut )