Given that I’m fine with not blogging for a few months, I might as well also be fine with posting twice in one week! I had some inspiration to work on the second CSS Kata: “Citizen Kane”. Here’s what I decided to do differently this time:
- Include all the other texts (next to the movie title) as well (as suggested by a friend of mine);
- Pick low-hanging fruit in making my effort look less shitty (e.g. using Paint.NET to find the correct color codes in the original poster);
- Use this Kata as an excuse to make an animated gif;
Here’s a comparison of the final result:
Pretty darn close! To clarify, the rightmost one is the same as the middle one with an opaque background showing the non-textual elements on the movie poster.
Oh yeah, I mentioned an animated gif, right? I kept track of all the changes I did, here’s my train of thought visualized:
(Animated GIF may not display correctly in RSS feed readers; open image or post directly to view it.)
No cheating was involved: these were the actual steps from zero to final result. Here’s the html I ended up using:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Everybody's talking about it! It's Terrific! Orson WellesCitizen KaneThe Mercury Actors |
And this is the CSS to get to the end result:
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
* { padding: 0; margin: 0; box-sizing: border-box; text-transform: uppercase; } .poster { position: relative; margin: 50px auto; width: 335px; height: 499px; background-color: #FFF; background-image: url('http://blog.jeroenheijmans.nl/wp-content/uploads/citizen-kane-background-semitransparent.png'); } #promo1, #promo2 { color: #FFF; text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000; } #promo1 { position: absolute; top: 8px; left: 15px; } #promo2 { position: absolute; top: 30px; left: 25px; font-size: 36px; font-family: "Rage Italic", "Brush Script MT"; font-weight: bold; text-transform: none; -webkit-transform: rotate(-5deg); } h2 { color: #F0E229; text-shadow: -0.15em 0.15em #000; font-family: Stencil, Georgia; font-weight: normal; font-size: 40px; text-align: center; width: 180px; position: absolute; top: 90px; left: 15px; } h1 { color: #C36025; font-weight: bold; text-shadow: -0.07em 0.085em #F5D510; position: absolute; right: 10px; top: 238px; width: 220px; font-size: 50px; font-family: "Eras Bold ITC", "Arial Black"; text-align: right; line-height: 0.95em; letter-spacing: -2px; -webkit-transform: matrix(1, -0.45, 0, 1.4, 0, 0); } h3 { position: absolute; bottom: 150px; right: 8px; font-size: 8px; font-weight: normal; text-transform: none; font-style: italic; font-family: Georgia; -webkit-transform: scale(0.7); } ol { position: absolute; bottom: 40px; right: -5px; list-style-type: none; text-align: center; font-family: Georgia; font-size: 10px; line-height: 1.1em; -webkit-transform: scaleX(0.8) } li:nth-child(1), li:nth-child(2) { text-decoration: underline; } |
Next up: “Face/Off”. Tomorrow, next week, next month, next year: who knows! Whenever I feel like it. Because blogging should be (mainly) for fun!