<html> <div>{{class_name}}</div> <div>{{repetitions_count}}</div> </html> 这是一个html页面代码,class_name是收到的运动名称,repetitions_count是收到的数字,请你修改这段代码使得呈现出来的页面更加精美和规律
时间: 2024-02-06 18:12:40 浏览: 21
好的,我可以帮你修改这段代码。以下是修改后的代码:
```html
<html>
<head>
<style>
.container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 4rem;
font-weight: bold;
}
.class-name {
color: #6495ED;
margin-right: 2rem;
}
.repetitions-count {
color: #FF8C00;
}
</style>
</head>
<body>
<div class="container">
<div class="class-name">{{class_name}}</div>
<div class="repetitions-count">{{repetitions_count}}</div>
</div>
</body>
</html>
```
修改后的代码使用了 flexbox 布局,使得页面内容居中显示。同时,为了让页面更加美观,我添加了一些样式。其中,`.class-name` 类的文字颜色为蓝色,`.repetitions-count` 类的文字颜色为橙色,字号为 4rem,加粗显示。你可以根据具体需求再进行调整。