我有一個自定義按鈕作爲錨點實現。該按鈕具有圖像和文字。請參閱樣式中的類
當按鈕有焦點時,我想對它進行不同的設計。具體來說,我想在圖像和文本週圍繪製一個虛線的矩形。我也想另外根據另一個班級來設計它。
這裏的按鈕代碼:
<a id="searchButton" class="button" href="#">
<span class="icon-search"></span>
Search
</a>
這裏的CSS代碼我的問題:
button:focus {
/*How do I make a rectangular dotted line around the button text and icon? /*
/* How do I refer to another class that has additional stylings? */
}
'輪廓所需的效果:1px的虛線灰色; '? –