<button class='myBtn'>
<svg></svg> // here should be an svg get it from the internet
<span>Clear Selections<span>
</button>
.myBtn {
display: flex;
border: 1px solid gray;
color: black;
background: ; // ur color here
}
另外,在发布此类问题之前,尽量先做一个调查。
当你想在HTMLCSS中做一些基本的事情时,往往有多种方法来实现。 这里有一个使用 "flexbox "样式的简单解决方案。
<div style="display: flex">
<img src="yourIcon.png"/>
<span>Clear Selections</span>
</div>
你也可以使用 float
风格。position: absolute
-基于风格等。