Get the App
SLTechnology News&Howtos  ›  Development  › 

How to set the percentage width of div ​

Shulou Source: shulou.com Published: 2022-06-01 07:43:42 09月26日 Update

This article mainly explains "how to set the div percentage width". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to set the div percentage width.

Percentage width

Usage:

.wai {width:500px} .bfb {width:80%}

My width is 80%.

If the div width of the configured class=bfb is 80%, then the width of the div is the width of the parent class=wai * 80%, that is, 500*80%=400px.

Get 80% of class=bfb the width of div is 400px

The percentage width is also the adaptive width.

Thank you for your reading, the above is the content of "how to set the div percentage width". After the study of this article, I believe you have a deeper understanding of how to set the div percentage width, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Width percentage percentage learning content that is ideas situations articles more knowledge knowledge points articles follow questions practice push research configuration verification Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi MariaDB vpn Linux