试图将目标.product-price on-sale
更改为绿色,但我无法。无法定位特定的CSS类
HTML
<h2 id="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="priceCurrency" content="USD" />
<link itemprop="availability" href="http://schema.org/InStock" />
<span class="product-price on-sale" itemprop="price">$ 1</span> <del class="product-compare-price"></del>
</h2>
CSS
section#buy h2.product-price-on-sale span {
color:green !important;
}
'span.product-price.on销售{...}'应该有所帮助。 – emmanuel 2015-02-23 16:36:59