我正在尝试用CSS网格和新规范的响应部分制作基本布局
CSS level 4
,但在编译sass的内容时,它对我不起作用,我是否有什么地方失败了?我是否遗漏了任何细节?
自定义媒体。scss公司
*{ margin: 0 ; padding: 0}
@custom-media --phone ( 320px < width < 480px);
@custom-media --tablets (481px < width < 767px);
@custom-media --ipad-landscape (768px < width < 1024px) and (orientation: landscape);
@custom-media --ipad-normal (768px < width < 1024px);
@custom-media --desktop (1025px < width < 1280px);
@custom-media --large (width > 1281px);
应用程序。scss公司
@import 'custom-media';
/**
*
* Login Page
*
*/
.container{
width: 100vw;
height: 100vh;
display: grid;
grid-template-columns: 60% 1fr;
grid-row: 1fr;
.presentation{
background:#CB3BBF;
}
.loginsection{
}
@media (--desktop) {
.container {
grid-template-columns: 1fr;
}
.presentation{
background:blue;
}
}
}
我尝试将宽度设置为1025px和1280 px之间的蓝色背景色,但它不起作用
铬版本n 64.0.3282.186