我使用的按钮必须有背景图像,但<input type="submit">不能有背景图像。
例如,我可以对图像使用Html.ActionLink:
@Html.ActionLink("Add to Cart", "AddCart","Products", new { id = Model.product_id,},new { @class = "**add-cart item_add"** })class = "add-cart item_add“在输入中不起作用
我该怎么办?非常感谢。
发布于 2017-08-01 11:20:08
类型为submit的输入按钮应该是可设置样式的;但是,对于image button,您可以使用<button type="submit"或<input type="image"。对于图像按钮,设置src属性;对于按钮,添加一个background-image: url("../images/something.png")作为示例。
https://stackoverflow.com/questions/45428080
复制相似问题