CSS样式.将箭头图像放在链接之前 [英] CSS styling. Put a arrow image before a link

查看:52
本文介绍了CSS样式.将箭头图像放在链接之前的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

链接文本右对齐.我想将箭头图像放置在链接文本之前,但不希望图像被链接.我在帖子中放了一个打印示例.

The link text is right aligned. I would like to place the arrow image before the link text but don't want image to be linked. I put a print-shot example in the post.

#submitYourConcern {
  background: url( '/_layouts/images/grey_arrow.png' ) no-repeat right;
  padding-right: 15px;
  color: #4b92db;
  text-align: right;
}

<div id="submitYourConcern">
  <a href="/submit.aspx">Submit Your Concern</a>
</div>

推荐答案

以下内容对我有用.

<style>
#submitYourConcern
{
    color: #4b92db!important;
    text-align: right;
}
#submitYourConcern:before{
content: url(/_layouts/images/grey_arrow.png);
padding-right: 5px;
}
</style>

这篇关于CSS样式.将箭头图像放在链接之前的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆