为什么图像使用显示:内联但行为像inline-block元素 [英] Why does image use display: inline but behaves like an inline-block element

查看:98
本文介绍了为什么图像使用显示:内联但行为像inline-block元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么是图像内联而不是inline-block的默认显示样式?



img元素的inline和inline-block之间有什么区别

解决方案

默认的浏览器样式表最初是使用 CSS1 HTML3.2 ,因此inline-block不可用或不必要。




Why is the default display style for image inline instead of inline-block?

Is there any difference between inline and inline-block for img elements, from what I can see it behaves exactly in the same way.

解决方案

The default browser stylesheets were initially created using CSS1 for HTML3.2, so inline-block was not available or necessary. There's no difference between them for img elements.

References

这篇关于为什么图像使用显示:内联但行为像inline-block元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆