為什么.box1后面輸入的width:100px沒有生效?
<!DOCTYPE html>
<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>flex布局</title>
? ? <style type="text/css">
? ? .box {
? ? ? ? background: blue;
? ? ? ? display: flex;
? ? }
? ? .box div {
? ? ? ? width: 200px;
? ? ? ? height: 200px;
? ? }
? ? .box1 {
? ? ? ? width:100px;
? ? ? ? background: red;
? ? }
? ? .box2 {
? ? ? ? background: orange;
? ? }
? ? .box3 {
? ? ? ? background: green;
? ? }
? ? </style>
</head>
<body>
? ? <div class="box">
? ? ? ? <div class="box1"></div>
? ? ? ? <div class="box2"></div>
? ? ? ? <div class="box3"></div>
? ? </div>
</body>
</html>
2020-07-30