我正在尝试将一个按钮置于商店的中央,但我不确定该怎么做。
<div class="product-form__item product-form__item--logo">
<label for="custom_photo">Upload your photo of pet/s</label>
<input required id="custom_photo" type="file" name="properties[Logo]" class="product-form__input">
</div>
最佳答案
我不确定我是否正确理解了你的问题,但我假设你愿意在中心勾勒出 div。
您可以通过添加单独的 CSS 文件或将其直接添加到 HTML 元素来实现。在下面的示例中,我们向 HTML div 添加了以下标记:
style="text-algin:center"
例如:
<div class="product-form__item product-form__item--logo" style="text-align:center">
<label for="custom_photo">Upload your photo of pet/s</label>
<input required id="custom_photo" type="file" name="properties[Logo]" class="product-form__input">
</div>
关于jquery - 无法对齐插入按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59151361/