我正在开发一个基于 Boostrap 3(html5boilerplate 自定义构建)的小项目,并尝试使用boostrap 文档中的“官方”媒体查询:
/* Extra small devices (phones, up to 480px) */
/* No media query since this is the default in Bootstrap */
/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm) { ... }
/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md) { ... }
/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg) { ... }
由于某种原因,媒体查询似乎不存在(@screen-sm、screen-md、screen-lg),我正在引导文件中搜索它,但找不到任何参考。
我的示例代码(main.css):
/* Small devices (tablets, 768px and up) */
@media (min-width: @screen-sm) {
.header-btn {display: none;}
}
/* Medium devices (desktops, 992px and up) */
@media (min-width: @screen-md) {
.slogan {display: none;}
}
/* Large devices (large desktops, 1200px and up) */
@media (min-width: @screen-lg) {}
基本上发生的事情是......什么都没有!
我在 Chrome 中收到这些错误:http: //i.solidfiles.net/0d0ce2d2a7.png
有任何想法吗?