How to set the percentage width of div
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!