gpt4 book ai didi

css - 内联 CSS 无法使用 jade

转载 作者:行者123 更新时间:2023-11-28 08:40:34 25 4
gpt4 key购买 nike

我正尝试按照此 google 页面中的建议优化 CSS 交付:

https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery

但是,我什至无法在 Jade 中重新创建他们的基本示例。以下代码不起作用:

html
head
title= title
meta(name='viewport' content='width=device-width, initial-scale=1.0')
style(type='text/css')
.blue{color:blue};
body
nav(class='navbar navbar-default navbar-fixed-top')
p(class='blue') test

p 标签没有选择我在 style 标签中分配给 .blue 的样式。 Jade 可以使用这种类型的内联 CSS 吗?

最佳答案

您尝试过使用 !important 吗?

html
head
title= title
meta(name='viewport' content='width=device-width, initial-scale=1.0')
style(type='text/css')
.blue{color:blue !important};
body
nav(class='navbar navbar-default navbar-fixed-top')
p(class='blue') test

关于css - 内联 CSS 无法使用 jade,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27827294/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com