CSS3 Border中的border-radius

简介:
1、CSS3 Border中的border-radius
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd" >
<html>
<head>
<style type= "text/css" >
div
{
border:2px solid #a1a1a1;
padding:10px 40px;
background:#dddddd;
width:300px;
border-radius:125px;
-moz-border-radius:25px; /* Firefox 3.6 and earlier */
}
</style>
</head>
<body>
 
<div>The border-radius property allows you to add rounded corners to elements.</div>
 
</body>
</html>

  2、阴影效果

<!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>Untitled Document</title>
<style type= "text/css" >
     div
     {
     width:300;
     height:200px;
     background-color:#009999;
     box-shadow:10px 10px 5px #888888;
     }
</style>
</head>
 
<body>
     <div style= "height:200px; width:300px" ></div>
</body>
</html>

  效果图:



本文转自Work Hard Work Smart博客园博客,原文链接:http://www.cnblogs.com/linlf03/archive/2012/01/11/2318990.html,如需转载请自行联系原作者

目录
相关文章
css3中的圆角border-radius
css3中的圆角border-radius
|
10月前
CSS3 border-radius
CSS3 border-radius
50 0
|
6天前
|
前端开发
CSS中的边框属性:border、border-width、border-color、border-style 详解
CSS中的边框属性:border、border-width、border-color、border-style 详解
115 44
|
2天前
|
前端开发
css 实用技巧 —— 使用border属性绘图(三角形、梯形、对话框尖角)
css 实用技巧 —— 使用border属性绘图(三角形、梯形、对话框尖角)
6 1
|
2月前
|
前端开发
css边框border(含代码,易懂)
css边框border(含代码,易懂)
|
2月前
|
前端开发
css如何将border线加到元素内部,占内边距,不占外边距
css如何将border线加到元素内部,占内边距,不占外边距
84 0
|
前端开发
css:border-radius绘制边框圆角-全圆和椭圆
css:border-radius绘制边框圆角-全圆和椭圆
113 0
css:border-radius绘制边框圆角-全圆和椭圆
|
前端开发 UED
前端祖传三件套CSS的盒模型之border
CSS中的盒模型是前端开发中最基本、最重要的概念之一。它描述了在HTML文档中每个元素的大小和位置,以及如何包裹这些元素。盒模型由四个组成部分:内容区域、内边距、边框和外边距。
97 0
|
前端开发
web前端-css边框(border)
web前端-css边框(border)
159 0
CSS 02 border-radius
html: <div class="demo"> </div> css: .demo{ width:200px; heigth:200px; border:1px solid #ccc; background-color:#f66; margin:50px auto; border-radius:50%; // border-radius: 50% 50% 50% 50%; } 画一个半圆 .demo{ width:200px; heigth:200px; border:1px solid #cc