点击小图出现大图的HTML代码
4个回答
博思aippt
2024-07-20 广告
2024-07-20 广告
博思AIPPT是基于ai制作PPT的智能在线工具,它提供了4种AI制作PPT的方式,包括AI生成大纲、AI直接生成PPT、文本生成PPT、AI提炼文档生成PPT,一站式集成多种AI生成PPT的方式,可满足办公用户的不同需求和使用场景。ai生...
点击进入详情页
本回答由博思aippt提供
展开全部
我是 弄出了的 而且 能够使大图 不变形
<div class="xs_pic_bg">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<asp:Repeater ID="rptlagerImg" runat="server">
<ItemTemplate>
<td>
<div >
<img id="main_img" name="nameImg" alt="家居大图" width="650" src='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>'/>
</div>
</td>
</ItemTemplate>
</asp:Repeater>
</tr>
</table>
</div>
<div class="xs_bt_bg02">
<table cellspacing="0" cellpadding="0" width="700px" border="0">
<tr>
<td align="center">
<div class="wrapper">
<div id="prev-arrow-container">
<img id="prev-arrow" alt="向前" src="images/left3-disabled.gif"/>
</div>
<div class="carousel-component" id="html-carousel">
<div class="carousel-clip-region">
<ul class="carousel-list">
<asp:Repeater ID="repPic" runat="server">
<ItemTemplate>
<li>
<img class="thumb" height="120" src='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>'
width="120" border="0" rel='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>' />
<br class="clear1">
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</div>
<script type="text/javascript">
<!--
function initCarousel_html_carousel(){
carousel = new Carousel('html-carousel', {animHandler:animHandler, animParameters:{duration:0.5}, buttonStateHandler:buttonStateHandler, nextElementID:'next-arrow', prevElementID:'prev-arrow', size:31})
}
Event.observe(window, 'load', initCarousel_html_carousel);
//-->
</script>
<div id="next-arrow-container">
<img id="next-arrow" alt="向后" src="images/right3-enabled.gif"/></div>
<br class="clear" />
<script type="text/javascript">
<!--
function buttonStateHandler(button, enabled){
if (button == "prev-arrow")
$('prev-arrow').src = enabled ? "images/left3-enabled.gif" : "images/left3-disabled.gif";
else
$('next-arrow').src = enabled ? "images/right3-enabled.gif" : "images/right3-disabled.gif";
}
function animHandler(carouselID, status, direction){
var region = $(carouselID).down(".carousel-clip-region")
if (status == "before") {
Effect.Fade(region, {to: 0.3, queue: { position:'end', scope: "carousel" }, duration: 0.2});
}
if (status == "after") {
Effect.Fade(region, {to: 1, queue: { position:'end', scope: "carousel" }, duration: 0.2});
}
}
//-->
</script>
<script type="text/javascript">
<!--
var thumbs = document.getElementsByClassName('thumb');
for (var i=0; i<thumbs.length; i++) {
thumbs[i].onclick = function () {$('main_img').src=this.rel;};
}
//-->
</script>
</div>
</td>
</tr>
</table>
</div>
<div class="xs_pic_bg">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<asp:Repeater ID="rptlagerImg" runat="server">
<ItemTemplate>
<td>
<div >
<img id="main_img" name="nameImg" alt="家居大图" width="650" src='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>'/>
</div>
</td>
</ItemTemplate>
</asp:Repeater>
</tr>
</table>
</div>
<div class="xs_bt_bg02">
<table cellspacing="0" cellpadding="0" width="700px" border="0">
<tr>
<td align="center">
<div class="wrapper">
<div id="prev-arrow-container">
<img id="prev-arrow" alt="向前" src="images/left3-disabled.gif"/>
</div>
<div class="carousel-component" id="html-carousel">
<div class="carousel-clip-region">
<ul class="carousel-list">
<asp:Repeater ID="repPic" runat="server">
<ItemTemplate>
<li>
<img class="thumb" height="120" src='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>'
width="120" border="0" rel='Admin/userfiles/Pic/<%#Eval("FUP_PicNameLarge")%>' />
<br class="clear1">
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</div>
</div>
<script type="text/javascript">
<!--
function initCarousel_html_carousel(){
carousel = new Carousel('html-carousel', {animHandler:animHandler, animParameters:{duration:0.5}, buttonStateHandler:buttonStateHandler, nextElementID:'next-arrow', prevElementID:'prev-arrow', size:31})
}
Event.observe(window, 'load', initCarousel_html_carousel);
//-->
</script>
<div id="next-arrow-container">
<img id="next-arrow" alt="向后" src="images/right3-enabled.gif"/></div>
<br class="clear" />
<script type="text/javascript">
<!--
function buttonStateHandler(button, enabled){
if (button == "prev-arrow")
$('prev-arrow').src = enabled ? "images/left3-enabled.gif" : "images/left3-disabled.gif";
else
$('next-arrow').src = enabled ? "images/right3-enabled.gif" : "images/right3-disabled.gif";
}
function animHandler(carouselID, status, direction){
var region = $(carouselID).down(".carousel-clip-region")
if (status == "before") {
Effect.Fade(region, {to: 0.3, queue: { position:'end', scope: "carousel" }, duration: 0.2});
}
if (status == "after") {
Effect.Fade(region, {to: 1, queue: { position:'end', scope: "carousel" }, duration: 0.2});
}
}
//-->
</script>
<script type="text/javascript">
<!--
var thumbs = document.getElementsByClassName('thumb');
for (var i=0; i<thumbs.length; i++) {
thumbs[i].onclick = function () {$('main_img').src=this.rel;};
}
//-->
</script>
</div>
</td>
</tr>
</table>
</div>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<a herf="大图路径" target="blank"><img src="小图路径" /> </a>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个是个js的代码啊,需要有这个插件才可以,以前我下了个,后来不知道哪去了
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询