制作圆角矩形框(可改变宽度)

首先用photoshop新建一个宽300px,高30px的画布,透明

制作成此图像

保存。通过旋转画布分别制出其他三个角。

制作原理如图:

具体步骤:

<!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=gb2312" />
<title>无标题文档</title>
</head>
<style type="text/css">
#rounded{
 margin:0;
 padding:0;
 width:400px;
 background:#ccc url(left_top.gif) no-repeat;
}
#rounded h3{
 text-align:center;
 margin:0;
 padding:30px 0 15px 10px;
 background:url(right_top.gif) no-repeat right top;
}
#rounded p{
 margin:0;
 padding:0;
 background:url(left_bottom.gif) no-repeat left bottom;
}
#rounded p span{
 text-indent:2em;
 margin:0;
 padding:0 5px 30px 10px;
 display:block;
 background:url(right_bottom.gif) no-repeat right bottom;
}
</style>
<body>
<div id="rounded">
<h3>未来,在我眼里</h3>
<p><span>然而,现实是残酷的,我的学习并不那么尽人意,我的未来能那么好吗?我在怀疑着,我的心里也渐渐阴暗起来。特别是踏上初三的漫漫征程后,青春期的叛逆性就日益在我的身上显露出来。这好比是冬天里埋在土里的一粒种子,现在遇到阳光便迫不及待地发芽长叶了。记得有一天,因为和父母闹了点别扭,我便赌气地甩下书包跑出家门,准备再也不回这个让我不快乐的家了。在跨出家门的一刹那我看见了父母一脸茫然的样子,但我仍义无反顾地飞跑掉,叛逆的火焰在心中猛烈地燃烧着。一脑的空白,满腹的委屈让我忍不住跑在一个角落处大哭一场。我在怀疑我的未来,原来我所谓的美好未来是那样的遥不可及,原来我的所谓的美好未来只是一场梦而已。</span></p>
</div>
</body>
</html>

posted @ 2011-10-17 10:00  蓝之光  阅读(249)  评论(0编辑  收藏  举报