div+css制作圆角宽度定宽边框

来源:互联网 发布:大数据公司销售好干吗 编辑:程序博客网 时间:2024/04/28 23:53

将图切为上部,中部,下部

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>css 固定大小圆角div</title></head><style type="text/css">*{margin:0;padding:0}body{font-size:12px;padding:100px;}.box{width:493px;height:auto;background:url(images/middle.png) repeat-y;/*放中部图片*/}.box h1{background:url(images/top.png) no-repeat left top; /*放顶部图片*/text-align:center;font-size:16px;padding-top:20px;} .box p{background:url(images/bottom.png) no-repeat left bottom;/*放顶部图片*/text-align:justify;padding:20px; text-indent:20px;line-height:20px;  }</style>        <div class="box">    <h1>美国66万民众大规模请愿"闹独立"</h1>        <p>中广网北京11月15日消息 据经济之声《天下财经》报道,美国总统奥巴马获得连任后仅仅一周        ,美国的50个州已有66万民众签署请愿书,请求白宫允许他们的州从联邦中分离出去并成立新的政府。分析        认为,这次美国民众大规模请愿"闹独立"只是在发泄对2012年总统大选结果的不满,基本上不会产生任何实际的影响和结果。</p>    </div><body></body></html>