足球游戏_中国足彩网¥体育资讯$

html5实现锚点时请使用id取代name
来源:易贤网 阅读:669 次 日期:2016-06-16 10:12:43
温馨提示:易贤网小编为您整理了“html5实现锚点时请使用id取代name”,方便广大网友查阅!

html5已经去掉name属性,实现锚点时请使用id,实例效果:http://keleyi.com/keleyi/phtml/html5/9.htm

支持chrome,火狐,ie8以上等浏览器。

以下是完整代码:

代码如下:

<!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>

<title>html5锚点实例--柯乐义</title><base target=_blank />

<style>

body{margin:0px;}

</style>

</head>

<body>

<div id=keleyihead><a href=http://keleyi.com>柯乐义</a> <a href=http://keleyi.com/a/bjac/hwqa4oex.htm>html5锚点</a> keleyi.com

<script type=text/javascript src=http://keleyi.com/kineryi/js/gggg728x90a.js></script></div>

<div style=height:30px;width:100%;text-align:center><a href=#keleyifoot target=_self>转到底部</a></div>

<div style=background-color:#959822; width:100%;height:150px;>请滚动鼠标使页面向下</div>

<div style=background-color:green; width:100%;height:150px;>www.keleyi.com</div>

<div style=background-color:red; width:100%;height:150px;>欢迎</div>

<div style=background-color:yellow; width:100%;height:150px;>hi</div>

<div style=background-color:silver; width:100%;height:150px;>

<a href=http://keleyi.com/dev/94fb5964c80ee829.htm target=_blank>绿色箭头图片返回顶部效果</a>

<a href=http://keleyi.com/a/bjac/7cc2358ac924ebc5.htm target=_blank>蓝色方块返回顶部</a>

<a href=http://keleyi.com/a/bjac/6f008786225269ac.htm target=_blank>纯文本返回顶部</a>

<a href=http://keleyi.com/a/bjac/8aa32432160f9aa4.htm target=_blank>漂亮的返回顶部、底部和留言</a></div>

<div style=background-color:aqua; width:100%;height:150px;>keleyi.com</div>

<div style=background-color:fuchsia; width:100%;height:150px;>keleyi</div>

<div style=background-color:green; width:100%;height:150px;>keleyi.com</div>

<div style=background-color:blue; width:100%;height:150px;>柯乐义</div>

<div style=background-color:olive; width:100%;height:150px;>柯乐义 监视下滚像素</div>

<div style=background-color:green; width:100%;height:150px;>keleyi.com</div>

<div style=background-color:purple; width:100%;height:150px;>jquery</div>

<div style=background-color:green; width:100%;height:150px;><a href=http://keleyi.com/a/bjac/f4a6f78d74a251c5.htm target=_blank>原文</a></div>

<div style=background-color:lime; width:100%;height:150px;>keleyi.com</div>

<div style=background-color:orange; width:100%;height:150px;>完整代码</div>

<div style=height:200px;width:100%;>html5已经去掉name属性,实现锚点时请使用id</div>

<div id=keleyifoot style=width:100%;height:276px;background: url(http://keleyi.com/images/footerimg.jpg); background-position:center top; background-repeat:no-repeat;text-align:center;><a href=#keleyihead target=_self>回到顶部</a></div>

</body>

</html>

直接转到页底示例:

http://keleyi.com/keleyi/phtml/html5/9.htm#keleyifoot

中国足彩网信息请查看网页制作
易贤网手机网站地址:html5实现锚点时请使用id取代name
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标