javascript锚点_使用JavaScript将锚点插入URL

当用户通过不含锚点的URL访问页面时,CSS3动画画廊无法正常显示大图。通过一行JavaScript代码,可以检测URL中是否含有锚点,若无,则自动插入,使画廊能正确呈现匹配的图像。
摘要由CSDN通过智能技术生成

javascript锚点

One drawback to my recent example of a CSS3 animated gallery with persistent images is that the technique used anchor tags referenced from a URL. This works perfectly well when the user is directed to the page via a URL that contains an anchor identifier, as in the link I’ve used in the previous sentence:

我最近的一个带有持久图像CSS3动画画廊示例的一个缺点是,该技术使用了从URL引用的锚标记 。 当用户通过包含锚点标识符的URL定向到页面时,这非常好用,就像我在上一句话中使用的链接一样:

<a href=/643/Animated-Gallery-With-Persistent-Images#aussie>the re
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值