将一个类的属性继承到另一个类

时间:2015-05-30 11:25:01

标签: css3

我有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
        }
    }

}

任何人都可以提供帮助。

1 个答案:

答案 0 :(得分:1)

A.css导入B.css

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

<强> B.css

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

// code in B.css
...
相关问题