【发布时间】:2014-10-07 06:29:04
【问题描述】:
在使用 SVG sprite 时,有没有办法针对正在使用的图标内的组和路径(相对于父容器)?
<a href="index.php" id="logo-type">
<svg><use xlink:href="#logo"></use></svg>
</a>
我希望能够将另一个类的应用程序上的图标外观更改为父容器。
#logo-type{
svg{
height: 100px;
width: 100px;
ellipse{ fill: blue;}
g {stroke:red;}
}
&.active {
ellipse{ fill: yellow;}
g {stroke:purple;}
}
}
【问题讨论】: