{"id":236097,"date":"2015-12-29T07:46:35","date_gmt":"2015-12-29T14:46:35","guid":{"rendered":"http:\/\/css-tricks.com\/?p=236097"},"modified":"2015-12-29T07:46:35","modified_gmt":"2015-12-29T14:46:35","slug":"should-i-use-a-video-as-a-background","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/should-i-use-a-video-as-a-background\/","title":{"rendered":"Should I use a video as a background?"},"content":{"rendered":"

A reader writes in:<\/p>\n

I’ve seen done beautifully, but I’m having a hard time finding any articles on best practices. I try to steer clients away from wanting video background even though it’s hard to argue against it because it does look stunning when done right.<\/p>\n

“Look at my competitor’s website, they have a video!! You can do it!!”, they say. <\/p>\n

The problem I run into is when a client actually sends me a video they want to use, it’s either crappy\/low quality or the file size is way too big and would never load in time before the user leaves the site and never looks back.<\/p><\/blockquote>\n

It’s time for a THOUGHT DUMP!<\/p>\n

<\/p>\n

Is it “just a trend”?<\/h3>\n

I don’t think “video” is a trend, but “cover the entire screen with video and set white text on top of it as the homepage” probably is a trend. Not that there is anything wrong with that. Another way to think of a trend is in fashion<\/em> and people don’t tend to be as negative about being in fashion. <\/p>\n

This particular trend is at least few years old now though. Posts like 60 Beautiful Examples of Websites With Full-Blown Video Backgrounds<\/a> are over 3 years old (as far as I can tell).<\/p>\n

People do tend to roll their eyes at old fashion.<\/p>\n

Sometimes trends are benign to results<\/h3>\n

There is research<\/a> that the seemingly superfluous trend of parallax scrolling doesn’t negatively impact “usability, enjoyment, satisfaction, and visual appeal” but increases fun.<\/p>\n

A surprise to me, at least.<\/p>\n

Does it fit with the brand? And your plan and vision for the site?<\/h3>\n

Remember, they hired you. <\/p>\n

There is that classic analogy where you wouldn’t tell a plumber how to install a faucet. You hired them to do it because they are the expert. In this case, this company hired you to design a website because you are the expert. That holds true up until you think “well, you do tell the plumber which faucet<\/em> you want installed.”<\/p>\n

Still, if they hand you a video that doesn’t seem to work<\/em> with the rest of the site, that’s not good.<\/p>\n

Video is just a medium, it’s not exempt from needing to adhere to the brand. Does it fit the color palette? Does it have the same voice and tone? Does it feel<\/em> like it belongs? <\/p>\n

Video is only going to get more and more normal<\/h3>\n

How it is used will evolve as well. The people in Harry Potter weren’t surprised that the pictures in the newspapers moved, it was their normal.<\/p>\n

The quality better be pretty darn high<\/h3>\n

Not because of the size, but because of the expectations<\/em>. If you’re going to force me to see this video, it better be kinda awesome. It better help me understand your thing in a quicker and more meaningful way. <\/p>\n

Is autoplay the only way?<\/h3>\n

People have aversion to autoplay. I don’t have a study to point you to, other than I’ve seen countless people squirm and grumble when they see it.<\/p>\n

No sound<\/h3>\n

Autoplay isn’t nearly as bad when there is no sound, and to be fair, the trend is for these videos not to have sound. Although, for me at least, when I see a video start to play automatically, it triggers uh oh shut it down<\/em> muscle memory.<\/p>\n

Performance<\/h3>\n

This is the elephant in the room. <\/p>\n

Even small videos are huge resources. Especially when you’re talking going full screen by default. Especially when the quality needs to be high or it will make the site embarrassingly trashy.<\/p>\n

Do you have a plan to not completely destroy performance? There are lots of studies showing that bad performance is bad bad bad<\/a>.<\/p>\n

Perhaps you can only load the video after the rest of the page is loaded? Mustard cut<\/a> it? Show a nice poster<\/code> image? Perhaps there is a way to do like…<\/p>\n

<video\r\n  src=\"#defer-loading\"\r\n  poster=\"nice-default.jpg\r\n  autoplay\r\n\/><\/code><\/pre>\n

Are there more tricks you can look into? Inlining it? Extreme compression? Streaming? Limiting colors \/ black and white? Overlaying static stuff (e.g. dots\/lines) to hide lower quality in an interesting way? Blur?<\/p>\n

Budgeting<\/h3>\n

Do you have a performance budget, such that the video can trigger sacrifices elsewhere, evening page weight out a bit? Seems like a fair approach. And a common one, as the trend seems to point to very simple pages with simple calls to action to take you elsewhere.<\/p>\n

Do you need a service?<\/h3>\n

In my experience, using a video hosting service like YouTube or Vimeo solves a boatload of pain points, like bandwidth fees and cross-browser interoperability. <\/p>\n

Can you design the player such that it works for the design? Or do you need more full control?<\/p>\n

Are you going to measure success?<\/h3>\n

If a video background is a sea change in the site’s design, wouldn’t it be a good idea to set up some metrics to ensure the change is a positive one? And have a plan if it isn’t?<\/p>\n

Need the code to make it full screen?<\/h3>\n

Color me a little skeptical of things like jQuery plugins<\/a>. <\/p>\n

CSS is what you need to position the video in the background and size it. <\/p>\n

Dudley Storey has approached it this way:<\/p>\n

video.fullscreen { \r\n  position: fixed;\r\n  top: 50%;\r\n  left: 50%;\r\n  min-width: 100%;\r\n  min-height: 100%;\r\n  width: auto;\r\n  height: auto;\r\n  z-index: -100;\r\n  transform: translate(-50%, -50%);\r\n}<\/code><\/pre>\n

And his demo even has some bonus features like pausing:<\/p>\n

See the Pen Fullscreen HTML5 Page Background Video<\/a> by Dudley Storey (@dudleystorey<\/a>) on CodePen<\/a>.<\/p>\n

His blog post on the subject<\/a> covers a few other important things too, like how to hide the video on small screens (if you want to) and dealing with IE 8.<\/p>\n","protected":false},"excerpt":{"rendered":"

A reader writes in: I’ve seen done beautifully, but I’m having a hard time finding any articles on best practices. I try to steer clients away from wanting video background even though it’s hard to argue against it because it does look stunning when done right. “Look at my competitor’s website, they have a video!! […]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sig_custom_text":"","sig_image_type":"featured-image","sig_custom_image":0,"sig_is_disabled":false,"inline_featured_image":false,"c2c_always_allow_admin_comments":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[4],"tags":[],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":305424,"url":"https:\/\/css-tricks.com\/how-to-repeat-text-as-a-background-image-in-css-using-element\/","url_meta":{"origin":236097,"position":0},"title":"How to Repeat Text as a Background Image in CSS Using element()","date":"March 26, 2020","format":false,"excerpt":"There\u2019s a design trend I\u2019ve seen popping up all over the place. Maybe you\u2019ve seen it too. It\u2019s this sort of thing where text is repeated over and over. A good example is the price comparison website, GoCompare, who used it in a major multi-channel advertising campaign. Nike has used\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/nike-add-repeating-text-featured.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":304931,"url":"https:\/\/css-tricks.com\/neumorphism-and-css\/","url_meta":{"origin":236097,"position":1},"title":"Neumorphism and CSS","date":"March 20, 2020","format":false,"excerpt":"Neumorphism (aka neomorphism) is a relatively new design trend and a term that\u2019s gotten a good amount of buzz lately. It\u2019s aesthetic is marked by minimal and real-looking UI that\u2019s sort of a new take on skeuomorphism \u2014 hence the name. It got its name in a UX Collective post\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/03\/neumorphism-featured.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":318246,"url":"https:\/\/css-tricks.com\/spotting-a-trend\/","url_meta":{"origin":236097,"position":2},"title":"Spotting a Trend","date":"July 30, 2020","format":false,"excerpt":"There are tons of smokin' hot websites out there, with an equal or greater number of talented designers and developers who make them. The web is awesome like that and encourages that sort of creativity. Even so, it amazes me that certain traits find their way into things. I mean,\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2020\/07\/blobby.png?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":336679,"url":"https:\/\/css-tricks.com\/platform-news-prefers-contrast-mathml-is-and-css-background-initial-values\/","url_meta":{"origin":236097,"position":3},"title":"Platform News: Prefers Contrast, MathML, :is(), and CSS Background Initial Values","date":"March 19, 2021","format":false,"excerpt":"In this week\u2019s round-up, prefers-contrast lands in Safari, MathML gets some attention, :is() is actually quite forgiving, more ADA-related lawsuits, inconsistent initial values for CSS Backgrounds properties can lead to unwanted \u2014 but sorta neat \u2014 patterns. The prefers-contrast: more media query is supported in Safari Preview After prefers-reduced-motion in\u2026","rel":"","context":"In "Weekly Platform News"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2021\/03\/wpn-20210319.jpg?fit=1200%2C600&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":362886,"url":"https:\/\/css-tricks.com\/metaphors-we-web-by\/","url_meta":{"origin":236097,"position":4},"title":"Metaphors We Web By","date":"January 31, 2022","format":false,"excerpt":"Maggie Appleton gets into what is perhaps the foremost metaphor the web is founded on: paper. Paper documents\u00a0were the original metaphor for the web. [...]The page you're reading this on still mimics paper. We still call it a\u00a0page\u00a0or an HTML\u00a0document. It follows the same typographic rules and conventions \u2013 black\u2026","rel":"","context":"In "Link"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2022\/01\/linkedpages_wjh9lh.webp?fit=900%2C587&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":360113,"url":"https:\/\/css-tricks.com\/adam-argyles-sick-mouse-out-css-hover-effect\/","url_meta":{"origin":236097,"position":5},"title":"Adam Argyle’s Sick Mouse-Out CSS Hover Effect","date":"January 7, 2022","format":false,"excerpt":"I was killing some time browsing my CodePen feed for some eye candy and didn't need to go past the first page before spotting a neat CSS hover effect by Adam Argyle. https:\/\/videopress.com\/v\/bOm32AjY?resizeToParent=true&cover=true&loop=true&muted=true&persistVolume=false&playsinline=true&preloadContent=metadata I must've spent 10 minutes just staring at the demo in awe. There's something about this that\u2026","rel":"","context":"In "Article"","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/css-tricks.com\/wp-content\/uploads\/2022\/01\/Screen-Shot-2022-01-07-at-12.14.12-PM.png?fit=1200%2C577&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"featured_media_src_url":null,"_links":{"self":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/236097"}],"collection":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/comments?post=236097"}],"version-history":[{"count":3,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/236097\/revisions"}],"predecessor-version":[{"id":236236,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/posts\/236097\/revisions\/236236"}],"wp:attachment":[{"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/media?parent=236097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/categories?post=236097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/css-tricks.com\/wp-json\/wp\/v2\/tags?post=236097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}