Created
June 9, 2013 17:24
-
-
Save TimPietrusky/5744393 to your computer and use it in GitHub Desktop.
A CodePen by Tim Pietrusky. Anti-aliasing on video - Enable anti-aliasing on video with ```transform-style: preserve-3d```. This is for the [question from Sam Saccone via twitter](https://twitter.com/sam_saccone/status/324216842300317696): do you have any ideas about anti aliasing for a 3d transformed video element? example: mojotech.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<h2>Anti-aliasing on video with "transform-style:preserve-3d"</h2> | |
<video autoplay> | |
<source src="http://www.mojotech.com/videos/snowcast.mp4" type="video/mp4"> | |
<source src="http://www.mojotech.com/videos/snowcast.webm" type="video/webm"> | |
<source src="http://www.mojotech.com/videos/snowcast.ogv" type="video/ogg"> | |
</video> | |
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Anti-aliasing on video | |
Enable anti-aliasing on video with "transform-style: preserve-3d". | |
This is for the question from Sam Saccone via twitter | |
"do you have any ideas about anti aliasing for | |
a 3d transformed video element? example: mojotech.com" | |
https://twitter.com/sam_saccone/status/324216842300317696 | |
# 2013 by Tim Pietrusky | |
# timpietrusky.com | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass"; | |
section { | |
margin:0 0 0 2em; | |
max-width:50em; | |
/* | |
* "enable" anti-aliasing on child elements | |
* by adding "transform-style" on the parent | |
*/ | |
@include transform-style(preserve-3d); | |
h2 { | |
font:bold 1.5em/1.5em sans-serif; | |
float:left; | |
max-width:50%; | |
} | |
video { | |
width: 225px; | |
border: solid 3px transparent; | |
display: block; | |
@include transform(rotateZ(-1.9deg) rotateX(21deg)); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment