概述
I have this simple HTML code (with Bootstrap) :
text to center
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute
I just want to vertically center the text "text to center" in the div, keeping the border as it is in the exemple (no height decrease).
I have tried things such my-auto or align-items-middle, also read questions asked before, but without success.
If possible I don't want to add classes (use existing bootstrap).
解决方案
You can used Flex box predefine class in Bootstrap for that:
text to center
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
For Information you can read here.
最后
以上就是冷艳犀牛为你收集整理的bootstrap4使得div居中_Bootstrap 4在div中垂直居中放置文本的全部内容,希望文章能够帮你解决bootstrap4使得div居中_Bootstrap 4在div中垂直居中放置文本所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复