惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
G
Google Developers Blog
WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
S
SegmentFault 最新的问题
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
I
InfoQ
MyScale Blog
MyScale Blog
V
V2EX
B
Blog
罗磊的独立博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

鬼影的基地

RSA:从 00 开始的钥匙串导入崩溃 RSA:从 00 开始的钥匙串导入崩溃 CVE-2025-61638:Sanitizer::validateAttributes data-XSS 萌娘百科水平越权漏洞 萌娘百科头像魔术字 IP 泄露 萌娘百科评论区 IP 泄露 修复 iPhone 13 iOS 16 Safari 中的 Bug 命名空间 在 CSS 中进行数据类型转换 在 iOS 的 Apple Mail 中添加 QQ邮箱 CodeMirror url() Bug 在 macOS 上部署 Viper CSS 自适应简单 Table CSS 像素画的方法
Safari animation Bug
鬼影233 · 2026-06-02 · via 鬼影的基地

前言

没啥好说的,众所周知 Safari 作为新时代 IE,Bug 一大堆。

另,本人未提报此 Bug。为什么?因为它是 Safari。

实例

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.spin {
	transform: rotate(0deg);
	animation: spin 10s linear infinite forwards paused -2s;
}

简介

只是一个简单的被暂停的动画,但是在 Safari 上动画不会暂停在 -2s 的位置,而是 0s 的位置。

解决方案

方案一

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.spin {
	animation: spin 10s linear infinite forwards paused -2s;
}

更加简单但可能不适用一些情况。

方案二

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}
.spin {
	animation: spin 10s linear infinite forwards paused -2s;
}

适用于更多情况,但代码可能更多。

方案三

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes fade-in {
	to {
		opacity: 1;
	}
}
.spin {
	transform: rotate(0deg);
	opacity: 0;
	animation: spin 10s linear infinite forwards paused -2s,
		fade-in 1s ease-out forwards;
}

增加另一个 animation-play-staterunning 的动画。