久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

為什么不鼓勵按鈕導(dǎo)航?

Why are button#39;s discouraged from navigation?(為什么不鼓勵按鈕導(dǎo)航?)
本文介紹了為什么不鼓勵按鈕導(dǎo)航?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

這可能是一個固執(zhí)己見的問題,但我環(huán)顧網(wǎng)絡(luò),似乎網(wǎng)絡(luò)開發(fā)人員喜歡將 <a> 標記設(shè)置為看起來像按鈕,而不是使用特定的 <按鈕>標簽.我在查看導(dǎo)航時明顯看到了這一點

This may be an opinionated question, but I was looking around the web and it seems like web developers like to style <a> tags to look like buttons, rather than use a specific <button> tag. I've noticeably seen this when looking at navigations

經(jīng)過一番研究,我發(fā)現(xiàn)了這個:

After a bit of research, I found this:

  • 按鈕不適合搜索,因為其中的文本對搜索引擎是不可見的.
  • 按鈕比鏈接更難更新,每次更新都需要 Photoshop 和新圖片.
  • 按鈕加載速度比鏈接慢,這對移動訪問者尤其不利.
  • 視覺障礙者不太容易使用按鈕.
  • 按鈕是不必要的,即使你想使用非標準字體,這要歸功于 TypeKit 等工具.~ 引用自這里

但是,這些原因"中的大多數(shù)似乎都非常站不住腳,并且您需要 photoshop"之類的答案似乎……嗯……無效?

However, most of these 'reasons' seems quite flimsy and answers like 'you need photoshop' seem... well... invalid?

所以我想知道:

在創(chuàng)建導(dǎo)航菜單時不使用 <button> 標簽是否有實際原因,而是將 <a> 標簽設(shè)置為看起來像按鈕?為什么按鈕不是常態(tài)?這不是他們的目的嗎?

Is there an actual reason why the <button> tags aren't used when creating navigation menus, and instead style <a> tags to look like buttons? Why aren't buttons the norm? Is this not what they're made for?

* 我不希望你在這里發(fā)表意見,也不希望有觀點.僅關(guān)于為什么會這樣的事實信息

推薦答案

閱讀了評論中發(fā)布的多個文檔后,似乎確實有一個明確的事實原因按鈕沒有使用導(dǎo)航欄.

After reading up on multiple documents posted in the comments, it seems that there is actually a clear factual reason buttons are not used in navigation bars.

當存在頁面重定向或?qū)⒂脩魩У骄W(wǎng)站的其他位置時使用這些.

These are used when there is a page redirect or taking a user elsewhere on the website.

  • 如果它導(dǎo)航,它就是一個鏈接.使用具有有效超文本引用的鏈接標記

~鏈接不是按鈕

按鈕元素

當您想要doSomething() 重定向用戶時使用這些.IE.提交表單/等.

Button elements

These are used when you want to doSomething() that is not redirecting the user. I.e. submitting a form / etc.

你需要問自己的問題是:

The question you need to ask yourself is:

此控件是否用于啟動即時操作該操作是導(dǎo)航到另一個頁面嗎?

Will this control be used to initiate an immediate action or Is the action to navigate to another page?

如果您的問題的答案是第一部分,那么您應(yīng)該使用 button 元素.而如果您希望使用后者,那么您應(yīng)該使用 a 元素.

if the answer to your question is the first part, then you should be using a button element. Whereas if it is the latter that you are wishing to do, then you should be using an a element.

進一步閱讀:

  • w3.org

鏈接不是按鈕.DIV 和 SPAN 也不是

何時使用按鈕元素

這篇關(guān)于為什么不鼓勵按鈕導(dǎo)航?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

How to check for duplicate CSS rules?(如何檢查重復(fù)的 CSS 規(guī)則?)
Remove duplicate CSS declarations across multiple files(刪除多個文件中的重復(fù) CSS 聲明)
How can I duplicate a div onclick event?(如何復(fù)制 div onclick 事件?)
opening html from google drive(從谷歌驅(qū)動器打開 html)
How to embed videos from Google drive to webpage?(如何將視頻從 Google 驅(qū)動器嵌入到網(wǎng)頁?)
How to view Google drive pdf link in iframe(如何在 iframe 中查看 Google Drive pdf 鏈接)
主站蜘蛛池模板: 国产精品美女久久久久久久网站 | 亚洲精品一区二区三区蜜桃久 | 亚洲一区二区三区四区视频 | 黄色欧美 | 波多野结衣中文视频 | 黄色大片免费网站 | 欧州一区二区三区 | 中文精品视频 | 美美女高清毛片视频免费观看 | 亚洲精品日韩欧美 | 成人高清在线视频 | 天堂视频中文在线 | 黑人久久久 | 亚洲欧美男人天堂 | 黄色大片在线视频 | 在线激情视频 | 国产精品一区二区福利视频 | 韩国成人在线视频 | 亚洲人的av | 亚洲国产一 | 在线观看免费福利 | 久久免费高清视频 | 国产一区二区三区四区五区加勒比 | 在线中文视频 | 成人av网站在线观看 | 欧美一区二区免费 | 一级a爱片性色毛片免费 | av入口| 国产一区亚洲 | 日韩一区在线播放 | 在线观看国产网站 | 国产男女猛烈无遮掩视频免费网站 | 黄色一级特级片 | 国产乱码精品一区二区三区中文 | 日韩有码一区二区三区 | 成人av免费 | 国产精品国产精品国产专区不片 | 亚洲精品一区二区三区蜜桃久 | 精品国产三级 | av国产精品| 欧美成人一区二区 |