如何在横幅中的 2 个按钮之间留出 0.5 厘米的间距?我被卡住了好一会儿。我应该更改我的 block en HTML 吗?
在我的 CSS 代码中
.myButtonRegister{
float: left;
background-color: #C22312;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.myButtonRegister a {
color: #f2f2f2;
text-decoration: none;
}
.myButtonLogin{
float: left;
background-color: black;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.button-action {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
}
你有想法吗? 感谢您的回答。 问候
最佳答案
添加 margin-right: 30px;属性到您的类 myButtonRegister。
.myButtonRegister{
float: left;
background-color: #C22312;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
margin-right: 30px;
}
关于html - 在我的横幅中的两个按钮之间创建一个空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52441021/