| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>039 transform</title>
- <style>
- html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
- body { font-family: sans-serif; font-size: 13px; padding: 10px; }
- h1 { font-size: 20px; margin: 0 0 6px 0; }
- p { margin: 0 0 10px 0; }
- .pane { float: left; width: 440px; margin-left: 10px; }
- .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
- .stage { width: 320px; height: 230px; background: #f4f4f4;
- border: 1px solid #999999; }
- .imgrow { height: 130px; padding: 10px 0 0 10px; }
- .cell { float: left; width: 150px; }
- .scaled { transform: scale(0.5); transform-origin: top left; }
- .rotated-img { transform: rotate(90deg); transform-origin: center; }
- .scaled-box { width: 80px; height: 40px; margin: 10px 0 0 10px;
- background: #cc3333; transform: scale(1.5);
- transform-origin: top left; }
- .ref-scaled-box { width: 120px; height: 60px; margin: 10px 0 0 10px;
- background: #cc3333; }
- .caption { clear: both; color: #555555; padding-top: 3px; }
- </style>
- </head>
- <body>
- <h1>039 · transform scale and rotate</h1>
- <p>Each pair must look identical. Transforms paint the element box and inline images; text and descendants keep their layout.</p>
- <div class="pane">
- <div class="label">A · transform</div>
- <div class="stage">
- <div class="imgrow">
- <div class="cell"><img class="scaled" src="PIC.BMP" width="194" height="122"></div>
- <div class="cell"><img class="rotated-img" src="TILE.PNG" width="64" height="64"></div>
- </div>
- <div class="scaled-box"></div>
- </div>
- <div class="caption">scale(0.5), rotate(90deg), scaled box</div>
- </div>
- <div class="pane">
- <div class="label">B · reference</div>
- <div class="stage">
- <div class="imgrow">
- <div class="cell"><img src="PIC.BMP" width="97"></div>
- <div class="cell"><img src="TILE90.PNG" width="64" height="64"></div>
- </div>
- <div class="ref-scaled-box"></div>
- </div>
- <div class="caption">97px image, pre-rotated tile, 120×60 box</div>
- </div>
- </body>
- </html>
|