blob: d8b1b14c8211d20b34244c3550a430468233dcba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
[[!meta title="CSS Video Backgrounds"]]
[[!meta date="2018-04-16"]]
With the release of Safari 11.1 on macOS and Safari on iOS 11.3, developers now have the ability to support background videos (mp4 support only - at the time of this article) with pure CSS.
Example:
.video-background {
background-image: url('path-to-video.mp4);
}
## See it in action
Check out the very basic CodePen I created below to see it live (make sure you view it in latest Safari or else you won't see anything :P)
<a href="https://codepen.io/bradleytaunt/pen/JLgrag/">CSS Video Background (Safari Only)</a>
You can read up on all the new features implemented in 11.1 Safari here:
[New WebKit Features in Safari 11.1](https://webkit.org/blog/8216/new-webkit-features-in-safari-11-1/)
|