巧用hideFocus改善超链接的用户体验

用户体验是个大话题,本文分享一下超链接中的hideFocus的用法,来小提升一下效果!

也许你还不知道它有什么作用,简单说一下,hideFocus就是在点击超链接时,对是否显示外虚线框的设定!

hideFocus即隐藏聚焦,具有使对象聚焦失效的功能,其功能相当于: onFocus="this.blur()" 也可写作 hidefocus="true",也可省略赋值直接写hideFocus。

如果超链接没有添加hideFocus,鼠标点击该超链接,则外面出现一个虚线框,即为聚焦,而使用了hideFocus则不会有虚线框。在IE下,需要在标签 A 的结构中加入 hidefocus="true" 属性即可!看下面演示你就知道了!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head><title> 巧用hidefocus改善超链接的用户体验 by nuodou.com </title></head>
<body>
<a href="#" hidefocus="true" title="">点此没有虚线框</a>
<br><br>
<a href="#" title="">点此可见有虚线框</a>
</body>
</html>

而在FF等浏览器中则相对比较容易,直接给标签 a 定义样式 outline:none; 就可以了,即:

A {outline:none;}

或者

A {blr:expression(this.onFocus=this.blur());outline:none;}  //支持IE

ps.也许你觉得不显示虚线框会降低用户体验,那你还是无视本文吧哈哈!

参与评论

  • 许小曼

    此贴有意思~

    4年前 (2016-01-01)
    回复
    回复许小曼
  • spotingbet

    www.nuodou.com is awsome !!
    [url=http://www.facebook.com/pages/Sportingbetcom/230985290247684]sportingbet[/url]

    8年前 (2011-06-23)
    回复
    回复spotingbet
  • Natisha Bellen

    Hello I wish to to share the comment right here regarding you to definitely have the ability to inform you simply how much i actually Liked this particular read. I have to elope in order to aTurkey Day Supper however wanted to leave you a simple comment. We preserved you So will end up being coming back subsequent function to see much more of yer quality articles. Continue the standard work.

    8年前 (2011-06-20)
    回复
  • Weston Klee

    Thank you for supplementary excellent blog. Exactly where otherwise might i get this particular thoughtful of information written in such an stimulate full way? i have been seeing for this kind of detail.

    8年前 (2011-06-19)
    回复
    回复Weston Klee
  • downloadfromyoutube

    www.nuodou.com is my favorite website now!
    [url=http://www.buzzfeed.com/ufcfan/how-to-download-from-youtube-1aqh]how to download from youtube[/url]

    8年前 (2011-06-18)
    回复
  • tabletkiodchudzanie

    I saw many sites but www.nuodou.com is best ever

    [url=http://www.facebook.com/pages/Tabletki-na-odchudzanie/216862285003816]tabletki na odchudzanie[/url]

    8年前 (2011-06-14)
    回复
  • buyecigarette

    www.nuodou.com is super, bookmarked!
    [url=http://www.buzzfeed.com/downloadarea/buy-njoy-electronic-cigarette-visit-our-store-2lp6]electronic cigarette store[/url]

    8年前 (2011-06-12)
    回复
    回复buyecigarette
  • mmabetting

    www.nuodou.com is amazing, bookmarked!

    [url=http://www.facebook.com/pages/MMA-betting/221344401210163]mma betting[/url]

    8年前 (2011-06-11)
    回复
    回复mmabetting
  • Ron Huttar

    Major thanks for the article post. Will read on…

    8年前 (2011-06-09)
    回复
    回复Ron Huttar
  • Orval Burglin

    I really liked reading your post!. Quallity content. With such a valuable blog i believe you deserve to be ranking even higher in the search engines :)

    8年前 (2011-06-09)
    回复
    回复Orval Burglin
  • ClenbuterolClenn

    I like www.nuodou.com , bookmarked for future reference

    [url=http://www.buzzfeed.com/bookie/legal-steroids-prohormones-bodybuilding-supple-39dn]buy legal steroids[/url]

    8年前 (2011-06-02)
    回复
  • Benton Jeffs

    Are you making this up as you go along?

    8年前 (2011-05-29)
    回复
    回复Benton Jeffs
  • Craig Malchow

    Good post! I have a random question for you. How do you get your blog indexed by bing? I have a related web blog.

    8年前 (2011-05-29)
    回复
    回复Craig Malchow
  • Warning Labels

    Thanks for your time meant for some other imperative article. The place else might any person get that type tips in that accomplish way of writing? I've got some sort of speech newly arriving 7-day period, and I'm sure hunting for many of these facts.

    8年前 (2011-05-23)
    回复
  • Most Warning Stickes

    I find myself like your story could very likely train your category concerning how you can make an awesome blog. That is fantastic! This wasn't claim, precisely what really became us was ones pattern. You know how to generate your blog a lot more than a rant around a challenge. Youve caused it to be possible for individuals to get in touch. Effective for you, since not really that a lot of most people realize theyre doing.

    8年前 (2011-05-22)
    回复
  • Warning Decals

    Thanks a ton to get one other fundamental article. The place more could anyone get this types of information in that finished way of producing? I have some sort of powerpoint presentation arriving full week, along with My organization is on the lookout for these kinds of information.

    8年前 (2011-05-22)
    回复
  • Top Bumper Sriskers

    While the following area of interest can be quite touchy usually, my opinion is normally which there needs to be some middle or common earth that him and i just about all can find. Anways, i do get pleasure from which youve increased applicable in addition to keen commentary in this case even though. Thanks for your time!

    8年前 (2011-05-21)
    回复
  • Top Bumper Labels

    I would like to express a admiration for the generosity looking after customers whom really need enable with this one go through. Your own personal responsibility to becoming your principles all-around ended up being unbelievably handy and has now surely prompted most people just as everyone to achieve your desired goals. The complete useful recommendations suggests considerably to me and additional far more to help you my own chap workforce. Cya out of everyone people.

    8年前 (2011-05-21)
    回复
  • Funny Warning Stickers

    We adore the invaluable information most people give as part of your articles and reviews. I can save your site with your pals examination here typically. I'm sure quite confident they will gain knowledge of a great deal of brand-new junk the following compared to anyone as well!

    8年前 (2011-05-20)
    回复
  • Mora Benadom

    Thanks for the post I actually learned something from it. Very good content on this site Always looking forward to new post.

    8年前 (2011-05-06)
    回复
    回复Mora Benadom