我正在尝试制作一个列出不同专业的网格,类似于此,但不是 4 列,我想要 3 个... 类似于此的网格
到目前为止,我正在尝试使用它,但是填充确实关闭了,因为每个按钮都需要根据里面单词的大小来使用不同的填充。所以使用这段代码,输出看起来像这样......(ps。引导程序是链接的,所以没有问题)
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
<body style="background-color:white">
<!-- heading -->
<div class="container-fluid">
<div class="tab">
<div class="row">
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button1')">Accounting and Information Systems</button>
</div>
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button2')">African Studies</button>
</div>
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button3')">American Indian Studies</button>
</div>
</div>
<div class="row">
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button1')">Anthropology</button>
</div>
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button2')">Art</button>
</div>
<div class="col">
<button class="tablinks" onclick="openTab(event, 'Button3')">Asian American Studies</button>
</div>
</div>
</div>
</div>
</body>
</html>