gpt4 book ai didi

css - 将一个类的属性继承给另一个类

转载 作者:行者123 更新时间:2023-11-28 17:04:46 24 4
gpt4 key购买 nike

我有 A.css 并在 B.css 中导入, A.css中有几个类rotate45、rotate90、rotate135和rotate180 我想在 B 中将它们用作

B.css
{
.roate{
// Get properties of rotate180
}

@media(min-width:570)
{
.roate{
// Get properties of rotate45
}
}

@media(min-width:750)
{
.roate{
// Get properties of rotate90
}
}

@media(min-width:950)
{
.roate{
// Get properties of rotate135
}
}

}

谁能帮忙解决这个问题。

最佳答案

A.css导入B.css

在文件开头使用@import url();

B.css

@import url('path/to/A.css');

// code in B.css
...

关于css - 将一个类的属性继承给另一个类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30545559/

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