why wont my font color work
Here is my css sheet i dont know why my font colors isn't working. Please help me out.
body {background-color: #d3d3d3;
font-color; #FF0000;
font-family: Calibre;
text-align center;}}
h1 {background-color: #FFFFFF;
font-color; #FF0000;
font-family: Calibre;
text-align center;}
h2 {background-color: #FFFFFF;
font-color; #FF0000;
font-family: Calibre;
text-align center;}
h3 {background-color: #FFFFFF;
font-color; #FF0000;
font-family: Calibre;
text-align center;}
p {color; #FF0000;
font-family: Calibre;
font-size: .90em;
text-indent: 3em; }
.nav {font-weight:normal ;
font-size: .9em; }
#footer {font-color: #333333;
font-size: .75em;
font-style: italic;}
#wrapper {width: 80%;
margin-left: auto;
margin-right: auto;}
#Contact {font-family Times new Roman;
font-size: .75em;
font-style: bold;}
ps these are the errrors i got.
2 body Value Error : color Parse Error color 2 body Parse Error #FF0000; 5 Parse Error [: Calibre; text-align center;}} h1] 10 h2 Value Error : color Parse Error color 10 h2 Parse Error #FF0000; 13 Parse Error [: Calibre; text-align center;} h3] 17 p Value Error : color Parse Error color 17 p Parse Error #FF0000; 22 Parse Error [: Calibre; font-size: .90em; text-indent: 3em; } .nav] 31 #Contact Value Error : font-family Parse Error Times new Roman 33 #Contact Value Error : font-style bold is not a font-style value : bold
There are typos:
font-color; #FF0000;
doesn't exist, should be color: #f00;
color: #FF0000;
instead of color; #FF0000; /* change ; for : */
color; #FF0000; /* change ; for : */
Calibri
, not Calibre
Use
#footer { color: #F00; }
This should work
设置文本元素的字体颜色,如下所示:
h1{
color:#ff0000;
}
链接地址: http://www.djcxy.com/p/2510.html
上一篇: 用Javascript中的文本位置(文本范围)替换html格式的文本
下一篇: 为什么不能使用我的字体颜色