谷歌应用程序脚本支持媒体查询吗



我正试图让媒体查询在谷歌应用程序脚本页面上运行,但它不起作用。这是我的代码:

@media screen and (max-width:640px){
body{
background-color: blue;
}
.card{
background:green;
}
}
</style>

你知道我做错了什么吗?

let output = HtmlService.createHtmlOutput('<b>Hello, world!</b>');
output.addMetaTag('viewport', 'width=device-width, initial-scale=1');

添加addMetaTag()将使媒体查询为您服务。

最新更新