demo.css 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. /*
  2. We start with a good ol' reset.
  3. That's the one by Eric Meyer http://meyerweb.com/eric/tools/css/reset/
  4. You can probably argue if it is needed here, or not, but for sure it
  5. doesn't do any harm and gives us a fresh start.
  6. */
  7. html, body, div, span, applet, object, iframe,
  8. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  9. a, abbr, acronym, address, big, cite, code,
  10. del, dfn, em, img, ins, kbd, q, s, samp,
  11. small, strike, strong, sub, sup, tt, var,
  12. b, u, i, center,
  13. dl, dt, dd, ol, ul, li,
  14. fieldset, form, label, legend,
  15. table, caption, tbody, tfoot, thead, tr, th, td,
  16. article, aside, canvas, details, embed,
  17. figure, figcaption, footer, header, hgroup,
  18. menu, nav, output, ruby, section, summary,
  19. time, mark, audio, video {
  20. margin: 0;
  21. padding: 0;
  22. border: 0;
  23. font-size: 100%;
  24. font: inherit;
  25. vertical-align: baseline;
  26. }
  27. /* HTML5 display-role reset for older browsers */
  28. article, aside, details, figcaption, figure,
  29. footer, header, hgroup, menu, nav, section {
  30. display: block;
  31. }
  32. body {
  33. line-height: 1;
  34. }
  35. ol, ul {
  36. list-style: none;
  37. }
  38. blockquote, q {
  39. quotes: none;
  40. }
  41. blockquote:before, blockquote:after,
  42. q:before, q:after {
  43. content: '';
  44. content: none;
  45. }
  46. table {
  47. border-collapse: collapse;
  48. border-spacing: 0;
  49. }
  50. /*
  51. Now here is when interesting things start to appear.
  52. We set up <body> styles with default font and nice gradient in the background.
  53. And yes, there is a lot of repetition there because of -prefixes but we don't
  54. want to leave anybody behind.
  55. */
  56. body {
  57. font-family: 'PT Sans', sans-serif;
  58. min-height: 740px;
  59. background: rgb(215, 215, 215);
  60. background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 500, from(rgb(240, 240, 240)), to(rgb(190, 190, 190)));
  61. background: -webkit-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
  62. background: -moz-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
  63. background: -ms-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
  64. background: -o-radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
  65. background: radial-gradient(rgb(240, 240, 240), rgb(190, 190, 190));
  66. }
  67. /*
  68. Now let's bring some text styles back ...
  69. */
  70. b, strong { font-weight: bold }
  71. i, em { font-style: italic }
  72. /*
  73. ... and give links a nice look.
  74. */
  75. a {
  76. color: inherit;
  77. text-decoration: none;
  78. padding: 0 0.1em;
  79. background: rgba(255,255,255,0.5);
  80. text-shadow: -1px -1px 2px rgba(100,100,100,0.9);
  81. border-radius: 0.2em;
  82. -webkit-transition: 0.5s;
  83. -moz-transition: 0.5s;
  84. -ms-transition: 0.5s;
  85. -o-transition: 0.5s;
  86. transition: 0.5s;
  87. }
  88. a:hover,
  89. a:focus {
  90. background: rgba(255,255,255,1);
  91. text-shadow: -1px -1px 2px rgba(100,100,100,0.5);
  92. }
  93. /*
  94. Because the main point behind the impress.js demo is to demo impress.js
  95. we display a fallback message for users with browsers that don't support
  96. all the features required by it.
  97. All of the content will be still fully accessible for them, but I want
  98. them to know that they are missing something - that's what the demo is
  99. about, isn't it?
  100. And then we hide the message, when support is detected in the browser.
  101. */
  102. .fallback-message {
  103. font-family: sans-serif;
  104. line-height: 1.3;
  105. width: 780px;
  106. padding: 10px 10px 0;
  107. margin: 20px auto;
  108. border: 1px solid #E4C652;
  109. border-radius: 10px;
  110. background: #EEDC94;
  111. }
  112. .fallback-message p {
  113. margin-bottom: 10px;
  114. }
  115. .impress-supported .fallback-message {
  116. display: none;
  117. }
  118. /*
  119. Now let's style the presentation steps.
  120. We start with basics to make sure it displays correctly in everywhere ...
  121. */
  122. .step {
  123. position: relative;
  124. width: 900px;
  125. padding: 40px;
  126. margin: 20px auto;
  127. -webkit-box-sizing: border-box;
  128. -moz-box-sizing: border-box;
  129. -ms-box-sizing: border-box;
  130. -o-box-sizing: border-box;
  131. box-sizing: border-box;
  132. font-family: 'PT Serif', georgia, serif;
  133. font-size: 48px;
  134. line-height: 1.5;
  135. }
  136. /*
  137. ... and we enhance the styles for impress.js.
  138. Basically we remove the margin and make inactive steps a little bit transparent.
  139. */
  140. .impress-enabled .step {
  141. margin: 0;
  142. opacity: 0.3;
  143. -webkit-transition: opacity 1s;
  144. -moz-transition: opacity 1s;
  145. -ms-transition: opacity 1s;
  146. -o-transition: opacity 1s;
  147. transition: opacity 1s;
  148. }
  149. .impress-enabled .step.active { opacity: 1 }
  150. /*
  151. These 'slide' step styles were heavily inspired by HTML5 Slides:
  152. http://html5slides.googlecode.com/svn/trunk/styles.css
  153. ;)
  154. They cover everything what you see on first three steps of the demo.
  155. */
  156. .slide {
  157. display: block;
  158. width: 900px;
  159. height: 700px;
  160. padding: 40px 60px;
  161. background-color: white;
  162. border: 1px solid rgba(0, 0, 0, .3);
  163. border-radius: 5px;
  164. box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
  165. color: rgb(102, 102, 102);
  166. text-shadow: 0 2px 2px rgba(0, 0, 0, .1);
  167. font-family: 'Open Sans', Arial, sans-serif;
  168. font-size: 30px;
  169. line-height: 36px;
  170. letter-spacing: -1px;
  171. }
  172. .slide q {
  173. display: block;
  174. font-size: 50px;
  175. line-height: 72px;
  176. margin-top: 100px;
  177. }
  178. .slide q strong {
  179. white-space: nowrap;
  180. }
  181. /*
  182. And now we start to style each step separately.
  183. I agree that this may be not the most efficient, object-oriented and
  184. scalable way of styling, but most of steps have quite a custom look
  185. and typography tricks here and there, so they had to be styled separately.
  186. First is the title step with a big <h1> (no room for padding) and some
  187. 3D positioning along Z axis.
  188. */
  189. #title {
  190. padding: 0;
  191. }
  192. #title .try {
  193. font-size: 64px;
  194. position: absolute;
  195. top: -0.5em;
  196. left: 1.5em;
  197. -webkit-transform: translateZ(20px);
  198. -moz-transform: translateZ(20px);
  199. -ms-transform: translateZ(20px);
  200. -o-transform: translateZ(20px);
  201. transform: translateZ(20px);
  202. }
  203. #title h1 {
  204. font-size: 180px;
  205. -webkit-transform: translateZ(50px);
  206. -moz-transform: translateZ(50px);
  207. -ms-transform: translateZ(50px);
  208. -o-transform: translateZ(50px);
  209. transform: translateZ(50px);
  210. }
  211. #title .footnote {
  212. font-size: 32px;
  213. }
  214. /*
  215. Second step is nothing special, just a text with a link, so it doesn't need
  216. any special styling.
  217. Let's move to 'big thoughts' with centered text and custom font sizes.
  218. */
  219. #mit {
  220. width: 600px;
  221. text-align: center;
  222. font-size: 60px;
  223. line-height: 1;
  224. }
  225. #mit strong,
  226. #mit b {
  227. display: block;
  228. font-size: 250px;
  229. line-height: 250px;
  230. }
  231. #mit .thoughts {
  232. font-size: 90px;
  233. line-height: 150px;
  234. }
  235. /*
  236. 'Tiny ideas' just need some tiny styling.
  237. */
  238. #thinkphp {
  239. width: 800px;
  240. text-align: center;
  241. }
  242. /*
  243. This step has some animated text ...
  244. */
  245. #swoole { width: 630px }
  246. /*
  247. ... so we define display to `inline-block` to enable transforms and
  248. transition duration to 0.5s ...
  249. */
  250. #swoole b {
  251. display: inline-block;
  252. -webkit-transition: 0.5s;
  253. -moz-transition: 0.5s;
  254. -ms-transition: 0.5s;
  255. -o-transition: 0.5s;
  256. transition: 0.5s;
  257. }
  258. /*
  259. ... and we want 'positioning` word to move up a bit when the step gets
  260. `present` class ...
  261. */
  262. #swoole.present .positioning {
  263. -webkit-transform: translateY(-10px);
  264. -moz-transform: translateY(-10px);
  265. -ms-transform: translateY(-10px);
  266. -o-transform: translateY(-10px);
  267. transform: translateY(-10px);
  268. }
  269. /*
  270. ... 'rotating' to rotate a quarter of a second later ...
  271. */
  272. #swoole.present .rotating {
  273. -webkit-transform: rotate(-10deg);
  274. -moz-transform: rotate(-10deg);
  275. -ms-transform: rotate(-10deg);
  276. -o-transform: rotate(-10deg);
  277. transform: rotate(-10deg);
  278. -webkit-transition-delay: 0.25s;
  279. -moz-transition-delay: 0.25s;
  280. -ms-transition-delay: 0.25s;
  281. -o-transition-delay: 0.25s;
  282. transition-delay: 0.25s;
  283. }
  284. /*
  285. ... and 'scaling' to scale down after another quarter of a second.
  286. */
  287. #swoole.present .scaling {
  288. -webkit-transform: scale(0.7);
  289. -moz-transform: scale(0.7);
  290. -ms-transform: scale(0.7);
  291. -o-transform: scale(0.7);
  292. transform: scale(0.7);
  293. -webkit-transition-delay: 0.5s;
  294. -moz-transition-delay: 0.5s;
  295. -ms-transition-delay: 0.5s;
  296. -o-transition-delay: 0.5s;
  297. transition-delay: 0.5s;
  298. }
  299. /*
  300. The 'imagination' step is again some boring font-sizing.
  301. */
  302. #websocket {
  303. width: 600px;
  304. }
  305. #websocket .imagination {
  306. font-size: 78px;
  307. }
  308. /*
  309. There is nothing really special about 'use the source, Luke' step, too,
  310. except maybe of the Yoda background.
  311. As you can see below I've 'hard-coded' it in data URL.
  312. That's not the best way to serve images, but because that's just this one
  313. I decided it will be OK to have it this way.
  314. Just make sure you don't blindly copy this approach.
  315. */
  316. #source {
  317. width: 700px;
  318. padding-bottom: 300px;
  319. /* Yoda Icon :: Pixel Art from Star Wars http://www.pixeljoint.com/pixelart/1423.htm */
  320. /*background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAEYCAMAAACwUBm+AAAAAXNSR0IArs4c6QAAAKtQTFRFsAAAvbWSLUUrLEQqY1s8UYJMqJ1vNTEgOiIdIzYhjIFVLhsXZ6lgSEIsP2U8JhcCVzMsSXZEgXdOO145XJdWOl03LzAYMk4vSXNExr+hwcuxRTs1Qmk+RW9Am49eFRANQz4pUoNMQWc+OSMDTz0wLBsCNVMxa2NBOyUDUoNNSnlEWo9VRGxAVzYFl6tXCggHbLNmMUIcHhwTXkk5f3VNRT8wUT8xAAAACQocRBWFFwAAAAF0Uk5TAEDm2GYAAAPCSURBVHja7d3JctNAFIZRMwRCCGEmzPM8z/D+T8bu/ptbXXJFdij5fMt2Wuo+2UgqxVmtttq5WVotLzBgwIABAwYMGDCn0qVqbo69psPqVpWx+1XG5iaavF8wYMCAAQMGDBgwi4DJ6Y6qkxB1HNlcN3a92gbR5P2CAQMGDBgwYMCAWSxMlrU+UY5yu2l9okfV4bAxUVbf7TJnAwMGDBgwYMCAAbMLMHeqbGR82Zy+VR1Ht81nVca6R+UdTLaU24Ruzd3qM/e4yjnAgAEDBgwYMGDA7AJMd1l/3NRdVGcj3eX/2WEhCmDGxnM7yqygu8XIPjJj8iN/MGDAgAEDBgwYMAuDGb8q0RGlLCHLv1t9qDKWn3vdNHVuEI6HPaxO9Jo3GDBgwIABAwYMmIXBdC9ShGgMk+XnkXUeuGcsP/e1+lhNnZsL/G5Vs3OAAQMGDBgwYMCAWSxMR3SzOmraG5atdy9wZKzb+vg16qyqe2FltbnAgAEDBgwYMGDALAxmTJSuN3WA76rnVca6GTnemGN1WoEBAwYMGDBgwIBZGMxUomy4+xO899V4LAg5Xnc2MGDAgAEDBgwYMGA218Wq+2K1LDqvY9xZu8zN8fICdM6btYABAwYMGDBgwIABMzfH0+pGU5afze2tXebmeAfVz+p8BQYMGDBgwIABAwbMPBzZ+oWmfJrln1273FhkbHzee9WWbw7AgAEDBgwYMGDALAKm43hcdctKgblcPamOhuXnXlY5Xs6bsW4FGyQCAwYMGDBgwIABswiYMceZKgvMo+h8mrHLTdn676rj+FEFoTtHd8MwOxEYMGDAgAEDBgyYRcBM5UhXqiymW3R3c9ARhWO/OmjqfjVZy+xEYMCAAQMGDBgwYBYG073OnCV0RFNhMhaOa9WfKmOB6XjHMN1tQmaAAQMGDBgwYMCA2VWY7vXjz1U4croAzgPztwIDBgwYMGDAgAEDZhswh035NBw59Dww3RgYMGDAgAEDBgwYMJuD6f4tXT7NUqfCdBvZLkxXdgQGDBgwYMCAAQNmt2DGj8WzwAfV/w7T/aq7mxwwYMCAAQMGDBgwuwqTOo7uTwTngflSzQ3TdaJvAwEDBgwYMGDAgAED5gSvgbyo5oHZ4Pc+gwEDBgwYMGDAgAEzhOm+5G0qTGaAAQMGDBgwYMCAAXNaMOcnls3tNwWm+zRzp54NDBgwYMCAAQMGDJh5YNL36k1TLuGvVq+qnKMbS5n7tulT9asCAwYMGDBgwIABA2ZumKuztLnjgQEDBgwYMGDAgNl5mH/4/ltKA6vBNAAAAABJRU5ErkJggg==);*/
  321. background-image: url("../images/cat.webp");
  322. background-position: 40px bottom;
  323. background-repeat: no-repeat;
  324. }
  325. #source q {
  326. font-size: 60px;
  327. }
  328. /*
  329. And the "it's in 3D" step again brings some 3D typography - just for fun.
  330. Because we want to position <span> elements in 3D we set transform-style to
  331. `preserve-3d` on the paragraph.
  332. It is not needed by webkit browsers, but it is in Firefox. It's hard to say
  333. which behaviour is correct as 3D transforms spec is not very clear about it.
  334. */
  335. #its-in-3d p {
  336. -webkit-transform-style: preserve-3d;
  337. -moz-transform-style: preserve-3d; /* Y U need this Firefox?! */
  338. -ms-transform-style: preserve-3d;
  339. -o-transform-style: preserve-3d;
  340. transform-style: preserve-3d;
  341. }
  342. /*
  343. Below we position each word separately along Z axis and we want it to transition
  344. to default position in 0.5s when the step gets `present` class.
  345. Quite a simple idea, but lot's of styles and prefixes.
  346. */
  347. #its-in-3d span,
  348. #its-in-3d b {
  349. display: inline-block;
  350. -webkit-transform: translateZ(40px);
  351. -moz-transform: translateZ(40px);
  352. -ms-transform: translateZ(40px);
  353. -o-transform: translateZ(40px);
  354. transform: translateZ(40px);
  355. -webkit-transition: 0.5s;
  356. -moz-transition: 0.5s;
  357. -ms-transition: 0.5s;
  358. -o-transition: 0.5s;
  359. transition: 0.5s;
  360. }
  361. #its-in-3d .have {
  362. -webkit-transform: translateZ(-40px);
  363. -moz-transform: translateZ(-40px);
  364. -ms-transform: translateZ(-40px);
  365. -o-transform: translateZ(-40px);
  366. transform: translateZ(-40px);
  367. }
  368. #its-in-3d .you {
  369. -webkit-transform: translateZ(20px);
  370. -moz-transform: translateZ(20px);
  371. -ms-transform: translateZ(20px);
  372. -o-transform: translateZ(20px);
  373. transform: translateZ(20px);
  374. }
  375. #its-in-3d .noticed {
  376. -webkit-transform: translateZ(-40px);
  377. -moz-transform: translateZ(-40px);
  378. -ms-transform: translateZ(-40px);
  379. -o-transform: translateZ(-40px);
  380. transform: translateZ(-40px);
  381. }
  382. #its-in-3d .its {
  383. -webkit-transform: translateZ(60px);
  384. -moz-transform: translateZ(60px);
  385. -ms-transform: translateZ(60px);
  386. -o-transform: translateZ(60px);
  387. transform: translateZ(60px);
  388. }
  389. #its-in-3d .in {
  390. -webkit-transform: translateZ(-10px);
  391. -moz-transform: translateZ(-10px);
  392. -ms-transform: translateZ(-10px);
  393. -o-transform: translateZ(-10px);
  394. transform: translateZ(-10px);
  395. }
  396. #its-in-3d .footnote {
  397. font-size: 32px;
  398. -webkit-transform: translateZ(-10px);
  399. -moz-transform: translateZ(-10px);
  400. -ms-transform: translateZ(-10px);
  401. -o-transform: translateZ(-10px);
  402. transform: translateZ(-10px);
  403. }
  404. #its-in-3d.present span,
  405. #its-in-3d.present b {
  406. -webkit-transform: translateZ(0px);
  407. -moz-transform: translateZ(0px);
  408. -ms-transform: translateZ(0px);
  409. -o-transform: translateZ(0px);
  410. transform: translateZ(0px);
  411. }
  412. /*
  413. The last step is an overview.
  414. There is no content in it, so we make sure it's not visible because we want
  415. to be able to click on other steps.
  416. */
  417. #overview { display: none }
  418. /*
  419. We also make other steps visible and give them a pointer cursor using the
  420. `impress-on-` class.
  421. */
  422. .impress-on-overview .step {
  423. opacity: 1;
  424. cursor: pointer;
  425. }
  426. /*
  427. This version of impress.js supports plugins, and in particular, a UI toolbar
  428. plugin that allows easy navigation between steps and autoplay.
  429. */
  430. .impress-enabled div#impress-toolbar {
  431. position: fixed;
  432. right: 1px;
  433. bottom: 1px;
  434. opacity: 0.6;
  435. }
  436. .impress-enabled div#impress-toolbar > span {
  437. margin-right: 10px;
  438. }
  439. /*
  440. With help from the mouse-timeout plugin, we can hide the toolbar and
  441. have it show only when you move/click/touch the mouse.
  442. */
  443. body.impress-mouse-timeout div#impress-toolbar {
  444. display: none;
  445. }
  446. /*
  447. In fact, we can hide the mouse cursor itself too, when mouse isn't used.
  448. */
  449. body.impress-mouse-timeout {
  450. cursor: none;
  451. }
  452. /*
  453. Now, when we have all the steps styled let's give users a hint how to navigate
  454. around the presentation.
  455. The best way to do this would be to use JavaScript, show a delayed hint for a
  456. first time users, then hide it and store a status in cookie or localStorage...
  457. But I wanted to have some CSS fun and avoid additional scripting...
  458. Let me explain it first, so maybe the transition magic will be more readable
  459. when you read the code.
  460. First of all I wanted the hint to appear only when user is idle for a while.
  461. You can't detect the 'idle' state in CSS, but I delayed a appearing of the
  462. hint by 5s using transition-delay.
  463. You also can't detect in CSS if the user is a first-time visitor, so I had to
  464. make an assumption that I'll only show the hint on the first step. And when
  465. the step is changed hide the hint, because I can assume that user already
  466. knows how to navigate.
  467. To summarize it - hint is shown when the user is on the first step for longer
  468. than 5 seconds.
  469. The other problem I had was caused by the fact that I wanted the hint to fade
  470. in and out. It can be easily achieved by transitioning the opacity property.
  471. But that also meant that the hint was always on the screen, even if totally
  472. transparent. It covered part of the screen and you couldn't correctly clicked
  473. through it.
  474. Unfortunately you cannot transition between display `block` and `none` in pure
  475. CSS, so I needed a way to not only fade out the hint but also move it out of
  476. the screen.
  477. I solved this problem by positioning the hint below the bottom of the screen
  478. with CSS transform and moving it up to show it. But I also didn't want this move
  479. to be visible. I wanted the hint only to fade in and out visually, so I delayed
  480. the fade in transition, so it starts when the hint is already in its correct
  481. position on the screen.
  482. I know, it sounds complicated ... maybe it would be easier with the code?
  483. */
  484. .hint {
  485. /*
  486. We hide the hint until presentation is started and from browsers not supporting
  487. impress.js, as they will have a linear scrollable view ...
  488. */
  489. display: none;
  490. /*
  491. ... and give it some fixed position and nice styles.
  492. */
  493. position: fixed;
  494. left: 0;
  495. right: 0;
  496. bottom: 200px;
  497. background: rgba(0,0,0,0.5);
  498. color: #EEE;
  499. text-align: center;
  500. font-size: 50px;
  501. padding: 20px;
  502. z-index: 100;
  503. /*
  504. By default we don't want the hint to be visible, so we make it transparent ...
  505. */
  506. opacity: 0;
  507. /*
  508. ... and position it below the bottom of the screen (relative to it's fixed position)
  509. */
  510. -webkit-transform: translateY(400px);
  511. -moz-transform: translateY(400px);
  512. -ms-transform: translateY(400px);
  513. -o-transform: translateY(400px);
  514. transform: translateY(400px);
  515. /*
  516. Now let's imagine that the hint is visible and we want to fade it out and move out
  517. of the screen.
  518. So we define the transition on the opacity property with 1s duration and another
  519. transition on transform property delayed by 1s so it will happen after the fade out
  520. on opacity finished.
  521. This way user will not see the hint moving down.
  522. */
  523. -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s;
  524. -moz-transition: opacity 1s, -moz-transform 0.5s 1s;
  525. -ms-transition: opacity 1s, -ms-transform 0.5s 1s;
  526. -o-transition: opacity 1s, -o-transform 0.5s 1s;
  527. transition: opacity 1s, transform 0.5s 1s;
  528. }
  529. /*
  530. Now we 'enable' the hint when presentation is initialized ...
  531. */
  532. .impress-enabled .hint { display: block }
  533. /*
  534. ... and we will show it when the first step (with id 'bored') is active.
  535. */
  536. .impress-on-bored .hint {
  537. /*
  538. We remove the transparency and position the hint in its default fixed
  539. position.
  540. */
  541. opacity: 1;
  542. -webkit-transform: translateY(0px);
  543. -moz-transform: translateY(0px);
  544. -ms-transform: translateY(0px);
  545. -o-transform: translateY(0px);
  546. transform: translateY(0px);
  547. /*
  548. Now for fade in transition we have the oposite situation from the one
  549. above.
  550. First after 4.5s delay we animate the transform property to move the hint
  551. into its correct position and after that we fade it in with opacity
  552. transition.
  553. */
  554. -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s 4.5s;
  555. -moz-transition: opacity 1s 5s, -moz-transform 0.5s 4.5s;
  556. -ms-transition: opacity 1s 5s, -ms-transform 0.5s 4.5s;
  557. -o-transition: opacity 1s 5s, -o-transform 0.5s 4.5s;
  558. transition: opacity 1s 5s, transform 0.5s 4.5s;
  559. }
  560. /*
  561. And as the last thing there is a workaround for quite strange bug.
  562. It happens a lot in Chrome. I don't remember if I've seen it in Firefox.
  563. Sometimes the element positioned in 3D (especially when it's moved back
  564. along Z axis) is not clickable, because it falls 'behind' the <body>
  565. element.
  566. To prevent this, I decided to make <body> non clickable by setting
  567. pointer-events property to `none` value.
  568. Value if this property is inherited, so to make everything else clickable
  569. I bring it back on the #impress element.
  570. If you want to know more about `pointer-events` here are some docs:
  571. https://developer.mozilla.org/en/CSS/pointer-events
  572. There is one very important thing to notice about this workaround - it makes
  573. everything 'unclickable' except what's in #impress element.
  574. So use it wisely ... or don't use at all.
  575. */
  576. .impress-enabled { pointer-events: none }
  577. .impress-enabled #impress { pointer-events: auto }
  578. .impress-enabled #impress-toolbar { pointer-events: auto }
  579. /*
  580. There is one funny thing I just realized.
  581. Thanks to this workaround above everything except #impress element is invisible
  582. for click events. That means that the hint element is also not clickable.
  583. So basically all of this transforms and delayed transitions trickery was probably
  584. not needed at all...
  585. But it was fun to learn about it, wasn't it?
  586. */
  587. /*
  588. That's all I have for you in this file.
  589. Thanks for reading. I hope you enjoyed it at least as much as I enjoyed writing it
  590. for you.
  591. */