×

marginbottom margin bottom

为什么设置浮动后 margin-bottom失效?bottom是什么意思

admin admin 发表于2022-05-12 10:24:17 浏览127 评论0

抢沙发发表评论

为什么设置浮动后 margin-bottom失效

《style》.logo {height: 50px;width: 50px;background-color: red;float: left;margin-bottom: 10px;}《/style》《div class=“logo“》《/div》《div style=“clear:both;“》《/div》《div class=“logo“ style=“float:none;width:100px;“》《/div》

给你修改后的代码,自己感受一下吧,margin-bottom不是失效了,而是你div用了浮动,你必须用clear:both清除浮动之后才能正常

bottom是什么意思

bottom 英[ˈbɒtəm] 美[ˈbɑ:təm] n. 底部; 末端; 臀部; 尽头; adj. 底部的; vt. 装底; 测量深浅; 查明真相; [例句]He sat at the bottom of the stairs他坐在最下面的一级楼梯上。[其他] 第三人称单数:bottoms 复数:bottoms 现在分词:bottoming过去式:bottomed 过去分词:bottomed

margin bottom是什么意思

名称:margin-bottom分类:外边距简述:设置对象下方外边距属性概述:margin-bottom是设置对象下方外边距属性的样式(Style)。