ساخت گوشه های گرد - Round Corner
با توجه به اینکه خیلی از کاربرا احیاناً تو طراحی هاشون میخوان اینچنین طرحی رو پیاده کنند
به خاطر کمی پیچیدگی کار بهتر دیدم کدهایی که نوشتم رو تو یه تاپیک مجزا واسه این موضوع بزارم
کدها تو اسپولینگ قرار دارن
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>rounded corner</title>
<meta name="generator" content="Studio 3 http://aptana.com/">
<meta name="author" content="Davod Osanlo(David-Jn)">
<!-- Date: 2011-02-16 -->
</head>
<style type="text/css">
.main{
margin-left: auto;
margin-right: auto;
padding: 0;
width:800px; /*width of the main DIV*/
background:#f08dc0; /*background for conetnet*/
}
.cn_tr{
background:url(cn_tr.gif) no-repeat;
background-position: top right;
}
.cn_tl{
background:url(cn_tl.gif) no-repeat;
background-position: top left;
}
.cn_br{
background:url(cn_br.gif) no-repeat;
background-position: bottom right;
}
.cn_bl{
background:url(cn_bl.gif) no-repeat;
background-position: bottom left;
}
.br_b{
background:url(br_b.gif) repeat-x;
background-position: bottom;
}
.br_t{
background:url(br_t.gif) repeat-x;
background-position: top;
}
.br_r{
background:url(br_r.gif) repeat-y;
background-position: right;
}
.br_l{
background:url(br_l.gif) repeat-y;
background-position: left;
}
.content{
padding:20px;
}
.content h1{
text-align:center;
color:#ffffff;
font-family:tahoma;
}
.content p{
text-align:center;
color:#ffffff;
font-size:larger;
font-weight:bold;
line-height:4em;
font-family:tahoma;
}
</style>
<body>
<!-- start for creat -->
<div class="main">
<!-- side border -->
<div class="br_l">
<div class="br_r">
<div class="br_t"> <!-- top border -->
<div class="cn_tl"><div class="cn_tr"><!-- creat top corner -->
<div class="br_b"> <!-- bottom border -->
<div class="cn_bl"><div class="cn_br"> <!-- creat bottom corner -->
<!-- you can insert any test or other elemnt-->
<div class="content">
<h1>The Round Corner Is Now Creat</h1>
<p>
You See Now?
</p>
</br>
</div>
</div></div></div></div>
</div></div></div></div>
<!-- end -->
</div>
</body>
</html>[/HTML]
و برای دریافت فایل های عکس به همراه فایل html به لینک زیر مراجعه کنید:
کد:
http://parsaspace.com/files/3368268884/?c=641
میتونید بنا به نیازتون تو ساختن یه Navigator یا یه Box برای pop-up از این کد استفاده کنید
یه توضیح کوچولو:
طرح اولیه رو تو فتوشاپ بزنید و برش های لازم رو با دقت انجام بدید