【发布时间】:2012-08-17 03:16:01
【问题描述】:
<image x="20" y="20" width="300" height="80" xlink:href="logo.png" />
有没有办法使用像素来定位图像?喜欢 CSS 精灵?
【问题讨论】:
-
使用像素定位 svg 中的图像元素?或者从 logo.png 中选择一个精灵(又名剪辑)?
<image x="20" y="20" width="300" height="80" xlink:href="logo.png" />
有没有办法使用像素来定位图像?喜欢 CSS 精灵?
【问题讨论】:
你可以使用 position:absolute 来定位它
例如
img {
position:absolute;
top:20px;
left:20px;
}
它将相对于它的父容器定位,该容器具有位置:相对设置。
希望对您有所帮助。
【讨论】: