请老师检查
来源:3-23 编程练习
weixin_慕村1291783
2020-12-09 10:50:52
# 具体遇到的问题
# 报错信息的截图
# 相关课程内容截图
# 尝试过的解决思路和结果
# 粘贴全部相关代码,切记添加代码注释(请勿截图)
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
p {
color: purple;
text-align: center;
}
/*此处写代码*/
@media (min-width:450px) {
p {
color: blue;
text-align: center;
}
}
@media (min-width:600px) {
p {
color: rgb(82, 203, 224);
text-align: center;
}
}
@media (min-width:750px) {
p {
color: green;
text-align: center;
}
}
@media (min-width: 800px) {
p {
color: yellow;
text-align: center;
}
}
@media (min-width:960px) {
p {
color: orange;
text-align: center;
}
}
@media (min-width:1100px) {
p {
color: red;
text-align: center;
}
}
</style>
</head>
<body>
<p>
我的颜色会随着屏幕大小的变化而变化。
</p>
</body>
</html>
1回答
好帮手慕夭夭
2020-12-09
同学你好,代码实现正确。继续加油,祝学习愉快~