代码
提交代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.out-box{
border:1px solid #ccc;
width: 200px;
height: 200px;
}
.demo{
border:1px solid #ccc;
height: calc(100% /3) ;
width: calc(100% /3) ;
}
</style>
</head>
<body>
<div class="out-box">
<div class="demo">
慕课网:计算函数学习
</div>
</div>
</body>
</html>
运行结果