CSS3媒体查询不工作在记事本++ [英] CSS3 Media Queries not working in Notepad++
本文介绍了CSS3媒体查询不工作在记事本++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将以下媒体查询
直接添加到我的网页的样式表中:
I am adding the below media query
directly to a style sheet to my webpage:
@media screen and (max-width: 480px) {
background-color:red;
}
所以我使背景颜色变成红色,如果媒体类型是屏幕,其最大宽度为480像素。但是Notepad ++不会将媒体查询作为CSS功能来显示,因此它不会按照应该显示的颜色显示。
So I am making the background colour change to red if the media type is screen and its maximum width is 480px. However Notepad++ is not picking up the media query as a CSS feature, it doesn't show in the colours as its supposed to.
有任何建议吗?
推荐答案
您要
@media screen and (max-width: 480px) {
#content {
background-color:red;
}
}
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries
查看第一个示例,规则进入媒体查询
see the first example, rules go inside of the media query
这篇关于CSS3媒体查询不工作在记事本++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文