在 title 元素 後添加 link 元素,具體如下:
<title>北郵人論壇</title>
<link rel="short icon" href="bupt.ico"></link>
上面的代碼表示:.icon 圖片直接放在了目錄 WebContent 下面。如果目錄結構爲 ...WebContent\images\bupt.ico ,則相應地改 href 爲:href="images/bupt.ico"
圖片類型:.ico , .gif 都可(.jpg 不可以)
在 title 元素 後添加 link 元素,具體如下:
<title>北郵人論壇</title>
<link rel="short icon" href="bupt.ico"></link>
上面的代碼表示:.icon 圖片直接放在了目錄 WebContent 下面。如果目錄結構爲 ...WebContent\images\bupt.ico ,則相應地改 href 爲:href="images/bupt.ico"
圖片類型:.ico , .gif 都可(.jpg 不可以)
文字的設置 顏色 div{ color: #FF0000; color: red; color: rgb(255,0,0); color: rgba(255,0,0,0.5); } 設置顏色有以
在 img 元素中添加 title 屬性: <img src="images/logo.gif" alt="bupt_logo" title="bupt"/>