how to size a div's height to its container height, using CSS?

后端 未结 14 1964
太阳男子
太阳男子 2020-12-16 19:34

How to size a div\'s height to its container height, using CSS ?


  
14条回答
  •  囚心锁ツ
    2020-12-16 19:41

    CSS files use the 'padding' function to determine the height and depth of containers. To change the height of the container field simple insert of adjust the padding fields for the specified containers.

    The code excerpt below is an example of the CSS used for a container class (you'd find this as in the html file.

    .container{padding-top:100px;padding-bottom:50px}header
    

提交回复
热议问题