纯CSS无图实现DIV边框平滑阴影
<!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>CSS边框阴影</title>
<style type="text/css">
div {border-width: 1px; border-style: solid; padding: 1px;padding:1px;}
.a {background-color: #F3F3F3; border-color: #FBFBFB;}
.b {background-color: #D8D8D8; border-color: #E8E8E8;}
.c {background-color: #FFF; border-color: #BBB; height: 100px;color:#ff0000;}
</style>
</head>
<body>
<div class="a">
<div class="b">
<div class="c">源码爱好者(CodeFans.net)提供编程源码、书籍教程、JavaScript/CSS特效代码以及常用软件下载等。</div>
</div>
</div>
</body>
</html>
相关文档:
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
padding: 0;
margin: 0;
}
fieldset, img {
border: 0;
}
table {
border-co ......
如果在用CSS设计布局时遇到BUG,请认真阅读以下内容,非常容易记忆的,不知道哪位高人把CSS BUG编成了顺口溜了!看看好不好记住呢?
一、IE边框若显若无,须注意,定是高度设置已忘记;
二、浮动产生有缘故,若要父层包含住,紧跟浮动要清除,容器自然显其中;
三、三像素文本慢移不必慌,高度设置帮你忙 ......
* {
margin:0;
padding:0;
font-size:13px;
*font-size:11px;
font-family:Verdana, Arial, 宋体,Helvetica, sans-serif;
/*scrollbar-face-color:#dff9fe;
scrollbar-highlight-color:#FFFFFF;
scrollbar-3dlight-color:#9adae7;
scrollbar-darkshadow-co ......
文字自动使用样式
.inputText{
border:1px solid #7898b8;
height:20px;
padding-left:2px;
line-height:20px;
background-image:url(images\\inputtext_bg.gif);
background-repeat:repeat-x;
color:#339900;
}
.inputText是 字体自动设置样式的名称
各种控件自动套用样式
比如table,td
table{border-colla ......