日期:2014-05-17 浏览次数:20908 次
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>HTML5 Canvas Demo</title> <style type="text/css"> body{ margin:0px; padding:0px; } .bg{ position:absolute; height:100%; width:100%; overflow-x: hidden; overflow-y:hidden; background-image: -moz-linear-gradient(top,#77D1F6, #2F368F); background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #77D1F6),color-stop(1, #2F368F)); } </style> </head> <body> </html>
<div class="bg"> <div class="panelBg"></div> </div>
.panelBg{ position:absolute; height:600px; width:800px; left:250px; top:20px; border-radius: 12px; background-color:#000000; opacity:0.5; }
<div class="bg"> <div class="panelBg"></div> <div class="panel"> </div> </div>
.panel{ position:absolute; height:550px; width:750px; left:275px; top:45px; border-radius: 12px; background-image: -moz-linear-gradient(top,#EBEBEB, #BFBFBF); background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EBEBEB),color-stop(1, #BFBFBF)); }
<div class="bg"> <div class="panelBg"></div> <div class="panel"> <div id="section1"> </div> <div id="section2"> </div> <div id="section3"> </div> </div> </div>
#section1{ border:1px solid red; position:relative; float:left; width:235px; height:530px; top:10px; left:10px; } #section2{ border:1px solid red; position:relative; float:left; width:235px; height:530px; top:10px; left:20px; } #section3{ border:1px solid red; position:relative; float:left; width:235px; height:530px; top:10px; left:30px; }
<div id="section1"> <div class="title">HTML5</div> <div class="subTitle">HTML5 是下一代的HTML,包含诸多新特性,比如绘制图形的canvas元素。</div> </div>
.title{ border:1px solid red; position:relative; margin:5px; font-family:微软雅黑; font-size:22px; font-weight:bold; text-align:center; color:#58595B; } .subTitle{ border:1px solid red; margin:5px; font-family:微软雅黑; font-size:14px; height:70px; font-weight:bold; text-indent:2em; color:#6D6E71; }