老师,我的问题是本节的3-23练习。

来源:3-23 编程练习

慕斯0469344

2019-09-11 20:22:08

<html>
<head>
    <meta charset="UTF-8">
<title>Document</title>
<style>
p{
color:red;
text-align:center;
}
/*此处写代码*/
/*mobile first*/
@media(max-width: 450px){
p{
color:purple;
}

}
@media(min-width: 451px)and(max-width: 600px){
p{
color:blue;
}
}
@media(min-width: 601px)and(max-width: 750px){
p{
color:cyan-blue;
}
}
@media(min-width: 751px)and(max-width: 800px){
p{
color:green;
}
}
@media(min-width: 801px)and(max-width: 960px){
p{
color:yellow;
}
}
@media(min-width: 961px)and(max-width: 1100px){
p{
color:orange;
}
}
@media(min-width: 1101px){
p{
color:red;
}
}
</style>
</head>
<body>
<p>
我的颜色会随着屏幕大小的变化而变化。
</p>
</body>
</html>

老师,效果没实现,您看我这是错在哪里了。

写回答

1回答

好帮手慕嘟嘟

2019-09-12

同学你好,

语法书写错误哦,and的两侧都要有空格。http://img.mukewang.com/climg/5d79b80f09d6a76c09990335.jpg

如果我的回答帮助了你,欢迎采纳,祝学习愉快~


0

0 学习 · 6815 问题

查看课程