| <!DOCTYPE html> | |
| <!-- | |
| | The surface color or image of the padding area is specified via | |
| | the "background" property. | |
| | https://www.w3.org/TR/CSS21/box.html#padding-properties | |
| --> | |
| <html> | |
| <head> | |
| <style> | |
| div { | |
| background-color: #2196f3; | |
| padding: 50px; | |
| } | |
| </style> | |
| <script> | |
| if (window.testRunner) { | |
| window.testRunner.waitUntilDone(); | |
| } | |
| var image = new Image(); | |
| var image_name = 'cobalt.png'; | |
| image.onload = function() { | |
| var cobalt = document.getElementById('div_tag'); | |
| cobalt.style.backgroundImage = 'url(' + image_name + ')'; | |
| if (window.testRunner) { | |
| window.testRunner.notifyDone(); | |
| } | |
| } | |
| image.src = image_name; | |
| </script> | |
| </head> | |
| <body> | |
| <div id='div_tag'></div> | |
| </body> | |
| </html> |