CSS實現文字的邊框效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>Cross-Browser Text Glow Demo</title>
<mce:style type="text/css"><!--
* {
font-family:Arial,Helvetica,sans-serif;
font-size:16px;
}
div {
position:absolute;
top:20px;
left:20px;
padding:0;
color:#000;
z-index:3;
}
#d2, #d3, #d4, #d5, #d6, #d7 {color:#fd6;}
#d8, #d9, #d10, #d11, #d12, #d13 {color:#ffa;}
.top {color:#fff;}
#d2 {
top:19px;
left:19px;
z-index:2;
}
#d3 {
top:21px;
left:21px;
z-index:2;
}
#d4 {
top:19px;
left:21px;
z-index:2;
}
#d5 {
top:21px;
left:19px;
z-index:2;
}
#d6 {
top:19px;
z-index:2;
}
#d7 {
top:21px;
z-index:2;
}
#d8 {
top:18px;
left:18px;
z-index:1;
}
#d9 {
top:22px;
left:22px;
z-index:1;
}
#d10 {
top:18px;
left:22px;
z-index:1;
}
#d11 {
top:22px;
left:18px;
z-index:1;
}
#d12 {
top:18px;
z-index:1;
}
#d13 {
top:22px;
z-index:1;
}
--></mce:style><style type="text/css" mce_bogus="1">* {
font-family:Arial,Helvetica,sans-serif;
font-size:16px;
}
div {
position:absolute;
top:20px;
left:20px;
padding:0;
color:#000;
z-index:3;
}
#d2, #d3, #d4, #d5, #d6, #d7 {color:#fd6;}
#d8, #d9, #d10, #d11, #d12, #d13 {color:#ffa;}
.top {color:#fff;}
#d2 {
top:19px;
left:19px;
z-index:2;
}
#d3 {
top:21px;
left:21px;
z-index:2;
}
#d4 {
top:19px;
left:21px;
z-index:2;
}
#d5 {
top:21px;
left:19px;
相关文档:
效果如下:
实现方法:利用一下两张图片:
前台代码:
<div id="nagivation">
&nb ......
1.全部的代码均在一个DIV容器(我暂时这样称呼) Head里面,我们来看看Head的写法
#Head{
text-align:center;
}
为什么Head前面有一个"#"号呢?
而有的却是在前面加一个"."比如 ".Head",有时候写css的时候干脆什么也不加,比如 td,body,他们有什么区别,具体怎么用,如果仔细你就会发现在HTML ......
盒子标签和属性对照
CSS语法(不区分大小写)
JavaScript语法(区分大小写)
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border ......
<style type="text/css">
/*
从上往下渐变
*/
body
{
FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#003C9F,endColorStr=white);
}
/*
从左上至右下渐变
*/
body
{
background-color:skyblue;
FILTE ......