版权声明:转载请注明出处,谢谢! https://blog.csdn.net/dreamstone_xiaoqw/article/details/90244374
Property is ignored due to the display. With ‘display: inline’, the width, height, margin-top, margin-bottom, and float properties have no effect.css(propertyIgnoredDueToDisplay)
问题
小编最近喜欢用vscode写代码。前几天新装一插件,名曰HTML CSS Support,DIY css时发现:
当一个类的样式设置为 display: inline 时,会报个警告,内容为
Property is ignored due to the display. With 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect.css(propertyIgnoredDueToDisplay)
有道翻译下:
属性将由于显示而被忽略。使用“display: inline”,宽度、高度、页边距顶部、页边距底部和浮动属性都没有效果。
解决
小编很粗浅,只能想到原因是将两个元素直接放在一行不行,需要每个元素都块状显示才可以。
遂将
.w-6 {
display: inline;
width: 50%;
}
更新为:
.w-6 {
display: inline-block;
width: 50%;
}
果然可以。
问题OK~
题外话
话说小编今日为啥不用百度翻译呢?请看下图:
意不意外?惊不惊喜?百度竟然报错啦!
小编很意外,遂记录之~
恶趣味
响应内容:
Error 5005
源站配置错误
DuEdge Event ID: 7bee77aba80428a3 你的IP: 101.80.54.179
如果您是网站管理员,点击查看如何修复。
DuEdge Event ID 7bee77aba80428a3 | 你的IP: 101.80.54.179 | 域名信息: fanyi.baidu.com
帮助支持 | 产品论坛
虽说再次刷新依然正常,但依然被小编截屏~
报错内容:
/favicon.ico:1 Failed to load resource: the server responded with a status of 409 ()
translate?aldtype=16…dict&lang=auto2zh:1 Failed to load resource: the server responded with a status of 409 ()
2019-5-15