html – 内跨越溢出外跨度

html – 内跨越溢出外跨度,第1张

概述我需要你的帮助, 我似乎无法弄清楚为什么我的内跨越溢出我的外跨度? 这是问题的图片: 这是HTML和CSS标记: <span style="border: 1px solid blue; display:inline-block; position: relative; width: 100%;"> <span style="display:inline-block; border:1p 我需要你的帮助,

我似乎无法弄清楚为什么我的内跨越溢出我的外跨度?

这是问题的图片:

这是HTML和CSS标记:

<span >     <span >       test     </span></span>
解决方法
span{    Box-sizing: border-Box;}
<span >     <span >test</span></span>

应用此CSS规则:

span{    Box-sizing: border-Box;}

border-Box : The wIDth and height propertIEs (and min/max propertIEs)
includes content,padding and border,but not the margin

你可以找到更多关于盒子大小here的信息

总结

以上是内存溢出为你收集整理的html – 内跨越溢出外跨度全部内容,希望文章能够帮你解决html – 内跨越溢出外跨度所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1044974.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存