首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在文本行中垂直对齐Bulma Button?

如何在文本行中垂直对齐Bulma Button?
EN

Stack Overflow用户
提问于 2019-09-14 03:48:09
回答 2查看 925关注 0票数 3

所以我通过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>

但它是这样呈现的:

按钮需要哪些类才能与文本垂直对齐?

EN

回答 2

Stack Overflow用户

发布于 2020-07-22 11:27:20

我知道这很老,但是因为这是我弹出的第一个结果,所以您要查找的类涉及level布局类。不过,从根本上讲,This the link to the documentation with examples.需要将内容包装在level容器中,然后使用level-item在容器中垂直对齐内容。您可以使用其他类来调整内容的大小。这是解决问题的一种方法。当然,还有其他的:

代码语言:javascript
复制
<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>
票数 3
EN

Stack Overflow用户

发布于 2019-09-14 04:19:57

Here is the answer I think

您还可以在css中搜索关于baseline属性的内容

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57929578

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档