所以我通过CDN使用Bulma,里面有一个带有<button>标签的<h2>标签:
<h2 class="title is-size-2-mobile is-3 has-text-white">Step 1: Pick which Cards and/or Cheatsheets youwant to learn from the <button class="button mt-10 has-background-success has-text-info has-text-centered is-vcentered ml-10 mr-10">Cheatsheets</button> in the menu.</h2>
但它是这样呈现的:

按钮需要哪些类才能与文本垂直对齐?
发布于 2020-07-22 11:27:20
我知道这很老,但是因为这是我弹出的第一个结果,所以您要查找的类涉及level布局类。不过,从根本上讲,This the link to the documentation with examples.需要将内容包装在level容器中,然后使用level-item在容器中垂直对齐内容。您可以使用其他类来调整内容的大小。这是解决问题的一种方法。当然,还有其他的:
<div class="level">
<h2 class="title is-size-2-mobile is-3 has-text-white level-item">
Step 1: Pick which Cards and/or Cheatsheets you want to learn from the
<button class="button mt-10 has-background-success has-text-info has-text-centered is-vcentered mx-1 level-item">Cheatsheets</button>
in the menu.</h2>
</div>发布于 2019-09-14 04:19:57
您还可以在css中搜索关于baseline属性的内容
https://stackoverflow.com/questions/57929578
复制相似问题