我一周前问过这个问题,但是没有人帮我解决这个问题,这是我的问题,我希望这次有人帮助我......
我正在尝试将包含图像的 jQuery 代码插入到<td>
表格中,但图像超出了表格范围。我尝试了很多方法,但没有奏效。
Javascript
<script type="text/javascript">
$(document).ready(function() {
var $elements = $('#picOne, #picTwo, #picTree, #picFour');
function anim_loop(index) {
$elements.eq(index).fadeIn(4000, function() {
var $self = $(this);
setTimeout(function() {
$self.fadeOut(4000);
anim_loop((index + 1) % $elements.length);
}, 6000);
});
}
anim_loop(0); // start with the first element
});
</script>
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>title</title>
<style>
div {
display: none;
position: absolute;
table-layout:fixed;
}
</style>
</head>
<body>
<table align="center" width="975" border="1" >
<tr height="54">
<td width="250" width="185">
<img src="logo.png" />
</td>
<td width="303" colspan="3">
bolbol
</td>
</tr>
<tr>
<td height="480" colspan="3">
<div id="imageHolder">
<div id="picOne"><img src="pic1.jpg" width="975px" /></div>
<div id="picTwo"><img src="pic1b.jpg" width="975px" /></div>
<div id="picTree"><img src="2b.jpg" width="975px" /></div>
<div id="picFour"><img src="2.jpg" width="975px" /></div>
</div>
</td>
</tr>
<tr>
<td width="206">
</td>
<td width="444">
</td>
<td>
</td>
</tr>
</table>
</body>
</html>
以下是图片:
http://postimage.org/image/i5g1jceuv/
http://postimage.org/image/n5hfzp28b/
我该如何解决?