实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>css background-image 简写 实例 - 自学教程(runoops.com)</title> <style> body { margin-left:200px; background:#5d9ab2 url('//demo.runoops.com/static/img/img_tree.png') no-repeat top left; } .container { text-align:center; } .center_div { border:1px solid gray; margin-left:auto; margin-right:auto; width:90%; background-color:#d0f0f6; text-align:left; padding:8px; } </style> </head> <body> <div class="container"> <div class="center_div"> <h1>Hello World!</h1> <p>这个实例包含了一些高级的 CSS 方法,后面章节会介绍到。</p> </div> </div> </body> </html>
运行结果: