gpt4 book ai didi

html - 在行内 block 按钮之间添加空间

转载 作者:太空宇宙 更新时间:2023-11-04 01:14:25 26 4
gpt4 key购买 nike

HTML/CSS 新手,我想在我创建的内联按钮之间添加一些空格。不知道该怎么做。

.button {
display: inline-block;
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 25px;
text-align: center;
font-size: 16px;
cursor: pointer;
}

.button:hover {
background-color: green;
}
<a href="..\Requests\Request" class="button">Standard Request</a>

<a href="..\Requests\PlannerUpload" class="button">Bulk or Special Request</a>

<a href="..\Requests\NewPlannerDevice" class="button">New Device Request</a>

<a href="..\Requests\Requesttest" class="button">Tester Request</a>

此代码生成在 photo 中看到的内容

最佳答案

增加 margin 怎么样?

.button {
display: inline-block;
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 25px;
text-align: center;
font-size: 16px;
cursor: pointer;
margin: 10px;
}

.button:hover {
background-color: green;
}
<a href="..\Requests\Request" class="button">Standard Request</a>

<a href="..\Requests\PlannerUpload" class="button">Bulk or Special Request</a>

<a href="..\Requests\NewPlannerDevice" class="button">New Device Request</a>

<a href="..\Requests\Requesttest" class="button">Tester Request</a>

关于html - 在行内 block 按钮之间添加空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50516242/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com