设置div的最小宽度 [英] setting minimum width of div

查看:120
本文介绍了设置div的最小宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面,里面有许多不同宽度的不同物体。我没有设置对象所在的div的宽度,因为我希望它能够扩展以包含其中的任何项目。但我确实希望div具有最小宽度。是否有可能做到这一点?

I have a page with many different objects of different widths. I am not setting the width of the div that the objects are within as I want it to be able to expand to include whatever items are within it. But I do want the div to have a minimum width. Is it possible to do this?

推荐答案

这是非常可能的。只需使用CSS min-width MDN页面有详细信息。

It is very possible. Just use CSS min-width. The MDN page has details.

这篇关于设置div的最小宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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