如何制作100%高度和宽度的儿童div?
<div class="parent">
<div class="child1">
Here 100% height and width child 1
</div>
<div class="child2">
Here 100% height and width child 2
</div>
</div>
感谢。
答案 0 :(得分:0)
如果您希望每个孩子都显示全屏,即100%的浏览器视口高度和宽度,请将100vh;
添加到您想要影响的div中。需要注意的是,这仅支持IE浏览器支持IE 11。
.child1,
.child2 {
height: 100vh;
}
它们将是100%宽度,因为它们是阻挡级别元素的div
个元素。
.child1,
.child2 {
height: 100vh;
}
<div class="parent">
<div class="child1">
Here 100% height and width child 1
</div>
<div class="child2">
Here 100% height and width child 2
</div>
</div>
答案 1 :(得分:-2)
您可以查看此site。
CSS高度和宽度。
您可以像这样设置您的css文件。
此元素的高度为200像素,宽度为50%
Dim wb As Workbook
Dim srcSht As Worksheet
Dim toPrnt As String
Set wb = ThisWorkbook
Set srcSht = wb.Sheets("print_array")
Dim myArr1() As Variant
myArr1 = srcSht.Range("myPrintArray")
Dim i As Long
Dim j As String
For i = LBound(myArr1, 1) To UBound(myArr1, 1)
j = myArr1(i, 1)
wb.Sheets(j).Activate
wb.ActiveSheet.Range("CCB_" & Left(j, 5) & "_Print").Select
Next i
wb.Sheets(Array("CAT01 - Request for Resource", _
"CAT02 - Resource Allocation", _
"CAT03 - Product Data Sources", _
"CAT04 - Target & Control Cells", _
"CAT05 - Matching And Deduping", _
"CAT06 - Exclusions", _
"CAT07 - Data from other teams", _
"CAT08 - Outputs", _
"CAT09 - Special Instructions", _
"CAT10 - Brief Meeting Sign Off" _
)).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PDF_FileAndPath, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=True
此元素的高度为100像素,宽度为500像素。
{{1}}