就像标题说的那样,我无法将 a 元素的背景设为一种纯色。相反,我的代码使每一行都成为颜色。我什至尝试将 php 元素包装在一个新的 div 中并设置该背景颜色,但它做同样的事情。任何建议都是有用的。
网站: http: //www.whatsatyourcore.com,底部小部件标题
的HTML:
<a class="teaser-title-top" title="Social customer service and your marketing strategy" href="http://whatsatyourcore.com/?p=78"> Social customer service and your marketing strategy</a>
CSS:
.teaser-title-top { background: black;}
a.teaser-title-top {
color: #fff;}
上面的“代码框”就是一个例子。第一个是背景对我的标题所做的事情。第二个是我想要的。