Learn how to style block buttons (full-width) with CSS.
<button type="button" class="block">Block Button</button>
To create a full-width button, add a width of 100% and make it into a block element:
.block {
display: block;
width: 100%;
border: none;
background-color: #04AA6D;
padding: 14px 28px;
font-size: 16px;
cursor: pointer;
text-align: center;
}
Try it Yourself »
Go to our CSS Buttons Tutorial to learn more about how to style buttons.
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!