3D CSS 变换,Firefox 中的锯齿状边缘

发布于 2025-01-04 03:08:08 字数 345 浏览 3 评论 0 原文

类似于“css 变换,chrome 中的锯齿状边缘”,Firefox 也会发生同样的情况3D 变换,例如: http://jsfiddle.net/78d8K/5/(<-记住:Firefox

这一次,backface-visibility没有帮助:(

有什么想法吗?

Similary to "css transform, jagged edges in chrome", same occurs with Firefox on 3D transforms, eg: http://jsfiddle.net/78d8K/5/ (<- remember: Firefox)

This time, backface-visibility doesn't help :(

Any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

薄荷梦 2025-01-11 03:08:08

编辑答案:(评论后)

“解决方法”,添加透明大纲属性:

outline: 1px solid transparent;

在 Firefox 10.0.2 Windows 7 上测试:http://jsfiddle.net/nKhr8/

在此处输入图像描述

原始答案:(取决于背景颜色)

“解决方法”,添加 >border 属性与背景颜色相同(本例为白色):

border: 1px solid white;

在 Firefox 10.0.2 Windows 7 上测试:http://jsfiddle.net/LPEfC/

在此处输入图像描述

Edited answer: (after comments)

"Workaround", add a transparent outline attribute:

outline: 1px solid transparent;

Tested on Firefox 10.0.2 Windows 7: http://jsfiddle.net/nKhr8/

enter image description here

Original answer: (background-color dependent)

"Workaround", add a border attribute with the same color of your background (white this case):

border: 1px solid white;

Tested on Firefox 10.0.2 Windows 7: http://jsfiddle.net/LPEfC/

enter image description here

溺ぐ爱和你が 2025-01-11 03:08:08

如果你想防止抗锯齿边框,

如果边框应该清晰可见,那么下面对我来说效果更好

border: 1px solid rgba(0, 0, 0, 0.1); 

,但这可能不是完美的解决方案,你最好坚持@Juan的答案。

下面是立方体转动的屏幕截图

在此处输入图像描述

If you want to prevent anti-aliased border

Below worked better for me

border: 1px solid rgba(0, 0, 0, 0.1); 

if the border should be clearly visible, this might not be the perfect solution though, in which you'd better stick to @Juan's answer.

Below is a taken screenshot of the cube turning

enter image description here

め可乐爱微笑 2025-01-11 03:08:08

除了使用 outline 之外,还可以使用以下方法:

box-shadow: 0 0 0 1px transparent;

Apart from using outline, the following works as well:

box-shadow: 0 0 0 1px transparent;
自由范儿 2025-01-11 03:08:08

filter:blur(.25px); 对我有用,看起来不太模糊。

示例: https://codepen.io/Grilly86/pen/QWLXBbX (尝试编辑第 22 行在 (S)CSS 中)

filter:blur(.25px); works for me and doesn't looks too blurry.

Example: https://codepen.io/Grilly86/pen/QWLXBbX (try editing line 22 in the (S)CSS)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文