In the following code, the width and height of the.outer container are: B, according to the HTML specification

<style>
.outer {
height: 50px;
}
.inner {
width: 120px;
height: 100px;
}
</style>

<div class="outer">
<span class="inner">content</span>
</div>
Copy the code
A. 50px high and 120px wideCopy the code
B. 50px high and 100% wideCopy the code
C. 100px high and 120px wideCopy the code
D. 100px high and 100% wideCopy the code

 

parsing

Div is display:block. If the width is set, the width is set. If the width is not set, the default value is used. The height is self-supported and the width is 100%