我试图让按钮向下移动,边距、填充、顶部与其他输入和标签处于同一水平,但它不会移动。
html代码:见图片
input[type="image"] .button-update-cart{
top:100px;
}
例如,在表格上,图像不在该位置:参见此图像
编辑
.page-cart .cart-totals .promo-code .field .button-update-cart{
position:relative;
}
.page-cart .cart-totals .promo-code .field input[type="image"]
{
top:100px;
}
它不起作用:(
任何见解将不胜感激!
最佳答案
您需要给元素 position: relative
才能使 top
生效。
关于css - 输入[类型 ="image"] 不会让步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5945548/