安裝SyntaxHighlighter代碼高亮插件後,會發現在顯示代碼區域的右上角出現一個?問號。這點和Popularity Contest插件相似,但是Popularity Contest插件可以通過後台設置將Show the [?] help link:設置為No去掉問號顯示,而SyntaxHighlighter插件沒有提供這個功能。我們可以通過修改SyntaxHighlighter插件源文件中的shCore.css文件去掉右上角顯示的?問號,到插件的安裝目錄wp-content\plugins\syntax-highlighter再進入\3.0.83\css目錄(3.0.83表示不同的版本號)找到shCore.CSS文件並打開該文件通過查找syntaxhighlighter .toolbar定位到
.syntaxhighlighter .toolbar {
position: absolute !important;
right: 1px !important;
top: 1px !important;
width: 11px !important;
height: 11px !important;
font-size: 10px !important;
z-index: 10 !important;
}
添加display: none;到最後一行,最終代碼為:
.syntaxhighlighter .toolbar {
position: absolute !important;
right: 1px !important;
top: 1px !important;
width: 11px !important;
height: 11px !important;
font-size: 10px !important;
z-index: 10 !important;
display: none;
}
通過display: none;屬性將工具條整個給隱藏掉了,所以右上角的?問號圖標也就不會被顯示了。