我正在尝试为我的表单制作一个按钮,该按钮具有图像背景并在背景顶部显示文本。看起来很简单,但无论我尝试什么,我都在努力让文本出现,并且在一个小时的搜索后努力寻找有类似问题的人,所以假设我在做一些愚蠢的事情!
这是我的CSS:
#detail-left .cart-button {
background : url("../graphics/cart-button.png");
border : none;
color : transparent;
height: 48px;
width: 118px;
padding: 10px;
line-height: 48px;
}
和我的html:
<input class='cart-button' type='submit' value='Add' />