【发布时间】:2020-12-04 11:29:35
【问题描述】:
【问题讨论】:
-
您的问题是什么?如何创建按钮?如何将它们彼此相邻放置而没有间隙?如何在其中添加图标?你有没有尝试过?
标签: javascript css reactjs
【问题讨论】:
标签: javascript css reactjs
我不建议使用负像素值作为边距,但它可以工作。
HTML:
<div class="flex-container">
<div class="download">
<span>Download</span>
// your icon here
</div>
<div class="print">
<span>Print</span>
// your icon here
</div>
</div>
CSS:
flex-container {
display: flex;
}
.download,
.print {
border: 2px solid blue;
display: inline-block;
align-items: center;
}
.print{
margin-left:-6px;
}
【讨论】: