我想知道如何正确格式化这些框

问题描述 投票:0回答:1

this is how it is at the moment I want to make it like this

我已经尝试更改边框大小、填充、显示类型(当前是内联块)并且更改框的宽度/高度不会改变任何内容。

这是CSS代码

.botões{
    font-size: 3em;
    border: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0px 12px;
    background-color: aquamarine;
    border-color: grey;
    border-style: solid;
    width: 30px;
    height: 30px;
}
html css formatting styles display
1个回答
0
投票

.d1 {
  font-family: sans-serif;
  font-weight: bold;
  background: black;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3px;
  width: 300px;
  padding: 1em;
  color: white;
}

.d1>div {
  border-radius: 3px;
  background-color: #444;
  text-align: center;
  padding: 1em;
}
<div class="d1">
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
  <div>7</div>
  <div>8</div>
  <div>9</div>
</div>

© www.soinside.com 2019 - 2024. All rights reserved.