工程课 Web-2.6. homework_6
原题链接
简单
作者:
L-China
,
2022-12-27 22:05:51
,
所有人可见
,
阅读 255
CSS
$CSS$ $code:$
<style>
div {
width: 100px;
height: 100px;
background-color: lightsalmon;
}
div:nth-child(1) {
margin: 10px 20px 30px 40px;
padding: 10px 20px 30px 40px;
}
div:nth-child(2) {
margin: 0 auto;
}
</style>
$AC$ $code:$
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>homework_6</title>
<style>
div {
width: 100px;
height: 100px;
background-color: lightsalmon;
}
div:nth-child(1) {
margin: 10px 20px 30px 40px;
padding: 10px 20px 30px 40px;
}
div:nth-child(2) {
margin: 0 auto;
}
</style>
</head>
<body>
<div>文本1</div>
<div>文本2</div>
</body>
</html>
通过状态: