1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>无图片形成圆角框</title>
6 <!--分析,通过像素的描绘来实现圆角的效果,-->
7 <style type="text/css">
8 * {
9 margin:0px;
10 padding:0px;
11 }
12 body {
13 font-family:Georgia, "Times New Roman", Times, serif;
14 font-size:20px;
15 }
16 .box-round {
17 width:500px;
18 margin:10px auto;
19 } /*余下的4个div会继承他的宽度,这也算是重点之一吧*/
20 .box-round .content {
21 border:1px solid #000;
22 border-width:0 1px; /*只要左右两边的边框,上下边框各通过上下4个div龙出来*/
23 background: #096;
24 border-left:1px solid #E2EFFA;
25 }
26 .b1, .b2, .b3, .b4 {
27 border:1px solid #000;
28 border-width:0 1px;
29 height:1px;
30 background:#096;
31 } /*重点,内容高度为1px,左右边框为1px,上下边框为0,形成的是一条宽为(border x 2 + width)的直线,通过将4个div内容背景设置为和主内容区一样,而边框不一样来达到圆角效果*/
32 .b1 {
33 margin:0 5px;
34 background:#000;
35 } /*最上面的边框margin为5px,高度为1px,上下边框的颜色可以通过在这里设置来实现*/
36 .b2 {
37 margin:0 3px;
38 height:2px;
39 } /*最上面的边框margin为3px,高度为2px*/
40 .b3 {
41 margin:0 2px;
42 } /*最上面的边框margin为2px,高度为1px*/
43 .b4 {
44 margin:0 1px;
45 } /*最上面的边框margin为1px,高度为1px,综上所述 (2+1+1+1 = 5)*/
46 </style>
47 </head>
48 <body>
49 <div class="box-round">
50 <div class="b1 clear"></div>
51 <div class="b2 clear"></div>
52 <div class="b3 clear"></div>
53 <div class="b4 clear"></div>
54 <div class="content">
55 <h1>Mozilla Firefox</h1>
56 <p> Referred to as IE or MSIE, Microsoft launched a web browser. Internet Explorer is the most widely used Web browser, although since 2004 it has lost some market share. In April 2005, it has a market share of about 85%.</p>
57 <p>Internet Explorer is Microsoft's new version of the Windows operating system as an integral part. In an earlier version of the operating system, it is an independent, free of charge. Windows 95 OSR2 from the beginning, it was all tied up as a new version of the Windows operating system in the default browser. However, the recent (2004 ~ 2005), a major update applies only to Windows XP SP2 and Windows Server 2003 SP1. Initially, Microsoft plans and the next version of the Windows operating system release Internet Explorer 7, but Microsoft recently announced that, Internet Explorer 7 in a test version (Beta 1) in the summer of 2005 will be made available to Windows XP SP2 users. In the second half of 2006 released Windows Vista will be bundled with the official version of Internet Explorer 7.0. 2008 on 5 years 3 release of Internet Explorer 8 Beta1.</p>
58 <p>As the first by bundling Windows and gain market share and growing out of major security hole, the implementation of its own inefficient and does not support W3C standards, Internet Explorer has been criticized, but had to admit it for the development of the Internet has contributed to .</p>
59 </div>
60 <div class="b4"></div>
61 <div class="b3"></div>
62 <div class="b2"></div>
63 <div class="b1"></div>
64 </div>
65 </body>
66 </html>