html怎么给锚点加滑动效果?
<mapname="Map"><areashape="rect"coords="6,13,149,78"href="#bottom"><areashape="rect"c...
<map name="Map">
<area shape="rect" coords="6,13,149,78" href="#bottom">
<area shape="rect" coords="5,117,144,148" href="#t1">
<area shape="rect" coords="3,149,146,180" href="#t3">
<area shape="rect" coords="4,181,145,212" href="#t2">
<area shape="rect" coords="4,212,141,244" href="#t4">
<area shape="rect" coords="3,242,144,273" href="#t5">
<area shape="rect" coords="3,272,142,309" href="#t6">
<area shape="rect" coords="4,308,144,345" href="#t7">
<area shape="rect" coords="5,347,149,404" href="#t8">
<area shape="rect" coords="6,84,142,117" href="#bottom">
</map>
要给这些锚点加上下滑动效果。请大神帮帮忙。。 展开
<area shape="rect" coords="6,13,149,78" href="#bottom">
<area shape="rect" coords="5,117,144,148" href="#t1">
<area shape="rect" coords="3,149,146,180" href="#t3">
<area shape="rect" coords="4,181,145,212" href="#t2">
<area shape="rect" coords="4,212,141,244" href="#t4">
<area shape="rect" coords="3,242,144,273" href="#t5">
<area shape="rect" coords="3,272,142,309" href="#t6">
<area shape="rect" coords="4,308,144,345" href="#t7">
<area shape="rect" coords="5,347,149,404" href="#t8">
<area shape="rect" coords="6,84,142,117" href="#bottom">
</map>
要给这些锚点加上下滑动效果。请大神帮帮忙。。 展开
展开全部
jQuery(function($) {
$("map[name='Map'] area").click(function() {
$("html, body").animate({
scrollTop: $($(this).attr("href")).offset().top + "px"
}, 1500);
return false;
});
});
试试
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
啥叫上下滑动效果?瞄点只是给图片加链接,不能给瞄点加动态效果的吧?
除非给添加瞄点的图片本身加动态效果
除非给添加瞄点的图片本身加动态效果
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询