首页 > 其他 > 详细

box-sizing Bootstrap

时间:2019-08-08 10:45:06      阅读:94      评论:0      收藏:0      [点我收藏+]

https://getbootstrap.com/docs/4.0/getting-started/introduction/#box-sizing

Box-sizing

For more straightforward sizing in CSS, we switch the global box-sizing value from content-box to border-box. This ensures padding does not affect the final computed width of an element, but it can cause problems with some third party software like Google Maps and Google Custom Search Engine.

On the rare occasion you need to override it, use something like the following:

 
.selector-for-some-widget {
  box-sizing: content-box;
}

With the above snippet, nested elements—including generated content via ::before and ::after—will all inherit the specified box-sizing for that .selector-for-some-widget.

Learn more about box model and sizing at CSS Tricks.

 

box-sizing Bootstrap

原文:https://www.cnblogs.com/chucklu/p/11319553.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!