[英]Create a space between two buttons in my banner
如何在横幅中的两个按钮之间留出0.5厘米的间距? 从那一刻起我就被困住了。 我应该用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%);
}
你有想法吗 ? 感谢您的回答。 问候
在类myButtonRegister中的以下行添加
margin-right:10px;
您可以根据需要更改10px。 希望这可以帮助。
尝试在.myButtonRegister
类中.myButtonRegister
此规则margin-right: 50px;
右加边距: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;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.