[css] 第146天 移动页面底部工具条有3个图标,如何平分?在设置边框后最后一个图标掉下去了怎么办?
haizhilin2013 opened this issue · comments
haizhilin commented
第146天 移动页面底部工具条有3个图标,如何平分?在设置边框后最后一个图标掉下去了怎么办?
cxwht commented
用flex不知道是不是差不多,如果掉下去的话就设置一下 box-sizing : border-box。或者是在设置时,设置四个div,将第四个设置为空div
zhangdxiuxiu commented
平分用flex布局,掉下去的话使用white-space:nowrap;? 初学前端有错误的话请指正,谢谢
HCLQ commented
平分用flex布局,掉下去的话使用white-space:nowrap;? 初学前端有错误的话请指正,谢谢
flex-wrap nowrap, 一般flex默认就是nowrap
white-space:nowrap是针对行内元素设置的,默认为normal
yeziWee commented
flex以后,space-around 或者space-between,再加个左右padding,设置border-box应该就不会掉下去了
Jun Zhang commented
box-sizing : border-box 即可解决
forever-z-133 commented
边框还可使用 伪元素定位 / box-shadow / outline 来模拟