如何在课堂上选择课程? CSS
需要做的事情:在“按钮”中选择“fourthRow”并使类出现在它自己的行上另外,如果有人知道如何使这个代码更有效,那将非常感激。非常湿的代码。
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Calculator</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="buttons">
<div class="fourthRow">
<div>
<button class="7">7</button>
</div>
<div>
<button class="8">8</button>
</div>
<div>
<button class="9">9</button>
</div>
<div>
<button class="divide">÷</button>
</div>
</div>
<div class="thirdRow">
<div>
<button class="4">4</button>
</div>
<div>
<button class="5">5</button>
</div>
<div>
<button class="6">6</button>
</div>
<div>
<button class="multiplicaton">x</button>
</div>
</div>
<div class="secondRow">
<div>
<button class="1">1</button>
</div>
<div>
<button class="2">2</button>
</div>
<div>
<button class="3">3</button>
</div>
<div>
<button class="subtract">-</button>
</div>
</div>
<div class="firstRow">
<div>
<button class="0">0</button>
</div>
<div>
<button class="dot">.</button>
</div>
<div>
<button class="equal">=</button>
</div>
<div>
<button class="add">+</button>
</div>
</div>
</div>
</body>
</html>
.....................................................................
-
.fourthRow, .thirdRow, .secondRow, .firstRow {
display: flex;
}