有没有办法只更改第一个参数“添加到购物车”的CSS样式? 示例更改文本的字体或颜色?
@Ajax.ActionLink( "Add To Cart", "addToCart", "Product", new { idProduct = @item.idProduct, quantity = 1 }, new AjaxOptions { HttpMethod = "POST", }, new { @class = "item-add-btn" } )
答案 0 :(得分:0)
也许在css,first-of-type或first-child中使用伪类。见例子
li:first-of-type {
background-color: yellow;
}
li:first-child {
background-color: yellow;
}