Comments: The name attribute has been removed from HTML5. Use the id when implementing the anchor. The following is a good example that supports browsers such as Chrome, Firefox, and IE8, new friends can learn Oh HTML5 has removed the name attribute, achieve the anchor point please use id, instance effect: http://keleyi.com/keleyi/phtml/html5/9.htm
Supports browsers such as Chrome, Firefox, and IE8.
The complete code is as follows:
The Code is as follows:
<! 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 anchor instance -- ke leyi </title> <base target = "_ blank"/>
<Style>
Body {margin: 0px ;}
</Style>
</Head>
<Body>
<Div id = "keleyihead"> <a href = "http://keleyi.com"> ke leyi </a> <a href = "http://keleyi.com/a/bjac/hwqa4oex.htm"> HTML5 anchor </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 "> go to the bottom </a> </div>
<Div style = "background-color: #959822; width: 100%; height: 150px;"> scroll down the page </div>
<Div style = "background-color: Green; width: 100%; height: 150px;"> www.keleyi.com </div>
<Div style = "background-color: Red; width: 100%; height: 150px;"> welcome </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"> Green Arrow picture back to top effect </a>
<A href = "http://keleyi.com/a/bjac/7cc2358ac924ebc5.htm" target = "_ blank"> the Blue Circle returns to the top. </a>
<A href = "http://keleyi.com/a/bjac/6f008786225269ac.htm" target = "_ blank"> Returns plain text to the top </a>
<A href = "http://keleyi.com/a/bjac/8aa32432160f9aa4.htm" target = "_ blank"> pretty back to top, bottom, and message </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;"> ke leyi </div>
<Div style = "background-color: Olive; width: 100%; height: 150px;"> ke leyi monitors downloading pixels </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 "> original </a> </div>
<Div style = "background-color: Lime; width: 100%; height: 150px;"> keleyi.com </div>
<Div style = "background-color: Orange; width: 100%; height: 150px;"> complete code </div>
<Div style = "height: 200px; width: 100%;"> the name attribute has been removed from html5. use id when implementing the anchor </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 "> back to the top </a> </div>
</Body>
</Html>
Example of directly going to the bottom of the page:
Http://keleyi.com/keleyi/phtml/html5/9.htm#keleyifoot