聲明: web小白的筆記,歡迎大神指點。聯系QQ:1522025433。
直接看實例吧!
<!doctype html> <html> <head> <meta charset="utf-8"> <title>a標簽缺少href屬性,鼠標經過時就不會出現手型</title> <style type="text/css"> a { display: block; width: 200px; height: 200px; margin-top: 10px; background-color: #ccc; } </style> </head> <body> <a>缺少href=""屬性</a> <a href="">有href=""屬性</a> </body> </html>
效果圖:

很明顯,沒有href的屬性的標簽,鼠標經過文本時,顯示的是文本光標 (像這樣 I ),鼠標經過時,也不會出現手型。
當然實際應用中,如果不給 a標簽 href屬性,那也就失去了 a標簽為 超鏈接的意義,此例只是蛋疼 測試一下。哈哈!見到了不要奇怪就好了。
