2

bootstrap 从 v4 升级到 v5 的注意事项

 1 year ago
source link: https://zhiqiang.org/it/bootstrap-v4-v5.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

bootstrap 从 v4 升级到 v5 的注意事项

作者: 张志强

, 发表于 2022-05-19

, 共 311 字 , 共阅读 27 次

bootstrap 是一个前端库,做一些常见的布局和效果,能省掉至少 95%的功夫。最近直接从 v4 升级到 v5 ,发现网页有些布局就乱掉了。这里是调整笔记。

最大的一个改变是 left 和 right 改成了 start 和 end。这是为了和布局保持一致(有些布局是从右到左的,这类布局绝大部分情况下用不到)。但导致了很多式样类的改动:

  • text-left -> text-start
  • text-right -> text-end
  • ml-* -> ms-* (其中 * 可以是 auto, 1, 2, 3 )
  • mr-* -> me-* (其中 * 可以是 auto, 1, 2, 3 )

Q. E. D.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK