HTML5已经去掉名称属性,实现锚点时请使用id,下面有个不错的示例支持Chrome,火狐,IE8以上等浏览器,新手朋友们可以学习下哦
HTML5已经去掉名称属性,实现锚点时请使用id
支持Chrome,火狐,IE8以上等浏览器。
以下是完整代码:
复制代码
代码如下:
30px; width:100%; text-align:center“> <a href="#keleyifoot" target="_self">转到底部</a> </ div> <div style =” background-color:#959822 ; width:100%; height:150px;“>请滚动鼠标使页面向下</ div>
com / a / bjac / 8aa32432160f9aa4.htm“ target =” _ blank“>漂亮的返回顶部,底部和消息</a> </ div> <div style =” background-color:Aqua; 宽度:100%;高度: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;宽度: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);背景-position:center top; background-repeat:no-repeat; text-align:center;“> <a href="#keleyihead" target="_self">返回顶部</a> </ div>
</ body >
</ html>
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h61489.shtml