我正在使用一个类来设置一些文本的样式,以及我想在类之后(文本右侧)放置图像的内容,显然!,我正在努力。这是我到目前为止所得到的。
<a href="#" class="tickbutton">Check your eligibility and apply now!</a>
.tickbutton {
color: #fff;
font-size: 15px;
background: #5460ac url(../../images/tick.png) no-repeat right;
background-position:150% 50%;
border: none;
border-radius: 6px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
padding: 10px 16px;
margin-bottom: 18px;
display: inline-block;
width:auto;
}
这会将图像(透明刻度)放置在容器内,我想将其定位在右侧。我试过使用 tickbutton:after 但它仍然继承了背景颜色,所以它“看起来”仍然在容器内。
这是可行的吗?
谢谢,克雷格