html中把按钮设置居中6,如何使用CSS将按钮居中?
我正在尝试向我简单的网页添加一个按钮。按钮本身看起来不错,但我不太清楚如何定位它。我希望它能够居中并位于正文的下方。它目前坐在左边。有关如何这样做的任何想法?
#logo {
width: 100%;
text-align: center;
padding: 10em 0 0.2em 0;
font-family: lato;
}
#sub {
color: #fff;
font-family: lato;
text-align: center;
word-spacing: 5em;
}
.button {
background-color: #3b3d45;
border: 6px solid #fff080;
display: inline-block;
cursor: pointer;
color: #ffffff;
font-family: Arial;
font-size: 12px;
padding: 15px 20px;
text-decoration: none;
margin: auto;
text-align: center;
}
.button:hover {
background-color: #707488;
}
ERIK SPIEKERMANN
Designer Typographer Entrepreneur
Learn More
任何帮助将不胜感激。谢谢!
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
