html - 变换:旋转模糊图像

标签 html css animation svg transform

如何在不损失质量的情况下应用旋转变换? 我试过添加 translateZ(0) 但它无济于事。 这是例子:

svg {
     background-color: rgb(93, 193, 93);
}
.rotated {
  transform: rotate(1deg);
}
<svg width="400" height="100">
  <image xlink:href="https://s11.postimg.org/vzvfu6osz/chip_25.png" width="60" height="60" x="90"/>
  <image xlink:href="https://s11.postimg.org/vzvfu6osz/chip_25.png" width="60" height="60" x="160" transform="rotate(1)"/>
</svg>
<div>
  <img src="https://s11.postimg.org/vzvfu6osz/chip_25.png"/>
  <img src="https://s11.postimg.org/vzvfu6osz/chip_25.png" class="rotated"/>
</div>

最佳答案

<svg width="400" height="100">
  <image x="50" y="20" xlink:href="https://s11.postimg.org/vzvfu6osz/chip_25.png" width="60" height="60" />
  <image x="120" y="20" transform="rotate(-90, 150, 50)" xlink:href="https://s11.postimg.org/vzvfu6osz/chip_25.png" width="60" height="60" />
</svg>

用 svg transform 属性旋转有什么用?您可以在那里将旋转中心设置为附加参数。

旋转后的图像看起来非常好。

关于html - 变换:旋转模糊图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40960765/

相关文章:

javascript - 绘制简单 SVG 路径的脚本会降低整个 PC 的速度

html - Bootstrap Image Responsive 在 IE 上搞砸了

html - 导航栏高度没有重新调整?

asp.net - 使用数据网格分隔列值的最佳方法是什么

html - 如何循环播放 CSS3 转换?

iphone - 在 Objective C 中模拟蜡烛火焰

javascript - 如何对 js 上的所有类做某事

html - iOS Safari 第一次没有呈现完整的页面

html - 在导航栏标题父元素中居中 <a> 元素

ios - 动画更新 View