简体   繁体   中英

Is it possible to auto change the size of group elements when the window size changes?

Here is the sample of my layout:

在此处输入图片说明

It is possible to have a fixed size elements and then when the window size changes, the elements also changes its size (and also all the paddings, margins and stuff).

Lastly, is there a way to set a limit on how small the group of elements can be?

is there a way to set a limit on how small the group of elements can be?

min-width css property is exactly what you need.

It is possible to have a fixed size elements and then when the window size changes, the elements also changes its size (and also all the paddings, margins and stuff).

the percentage value can help you achieve that functionality.

The CSS data type represents a percentage value. It is often used to define a size as relative to an element's parent object. Numerous properties can use percentages, such as width, height, margin, padding, and font-size. MDN

yes, it is possible. you have to use percentage instead of px.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM