css可以处理16,777,216颜色,可以使用名字、rgb值或十六进制代码。
Example Source Code
red红色
等同于
rgb(255,0,0)
等同于
rgb(100%,0%,0%)
等同于
#ff0000
等同于
#f00
有17个预先确定的颜色,它们是:
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy,
olive, orange, purple, red, silver, teal, white, and yellow.
transparent 也是一个正确的值。
rgb的三个值都是从0到255,0是最低级,255是最高级,这些值同样可以是百分比。
我们通常使用10进制即0-9,但hexadecimal使用16进制,即0到f。 http://www.mscto.com
十六进制三或六个数字长度前面带上#字符,三个长度是六个的压缩形式,比如#f00是ff0000的压缩,#c96是#cc9966。三位数很好理解,像rgb,第一个是红色,第二个是绿色,第三个蓝色。但六位数给于更多的颜色控制。
color和background-color
颜色可以使用color和background-color,是美国英语中"color"不是"colour"。
蓝色背景,黄色文字:
Example Source Code
h1 {
color: yellow;
background-color: blue;
}
这些颜色可能比较粗糙,你可以使用另外的色度:
Example Source Code
body {
font-size: 0.8em;
color: navy;
}
h1 {
color: #ffc;
background-color: #009;
}
你可以看到h1已经变成黄色和蓝色。
color和background-color可以使用在绝大部分html元素,包括body。
9 评论:
Hi there, i read your blog occasionally and i
own a similar one and i was just wondering if
you get a lot of spam comments? If so how do you stop it, any plugin
or anything you can recommend? I get so much lately it's driving me insane so any help is very much appreciated.
my web blog: weeknight
Hey there this is kinda of off topic but I was wanting to know if blogs
use WYSIWYG editors or if you have to manually code with HTML.
I'm starting a blog soon but have no coding skills so I wanted to get advice from someone with experience. Any help would be greatly appreciated!
Here is my webpage ... slight
I have gone ahead and added a hyperlink back to your
internet site from one of my clients requesting it. We have used your web site URL: http://www.
blogger.com/comment.g?blogID=7971914456108766276&postID=488225285413238213
and blog title: Blogger: 价值投资苦旅 to assure
you get the proper anchor text. If you woud like to check out where your
website link has been placed, please contact me at:
leoramaples@gmail.com. Many thanks
Feel free to visit my site: defined
I'm not sure exactly why but this weblog is loading incredibly slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later and see if the problem still
exists.
my webpage stump grinding
Hello! I realize this is somewhat off-topic but
I needed to ask. Does operating a well-established website such as
yours require a lot of work? I am completely new to writing a blog however I do
write in my journal everyday. I'd like to start a blog so I can share my personal experience and thoughts online. Please let me know if you have any kind of recommendations or tips for brand new aspiring bloggers. Thankyou!
Also visit my web page; www.moshable.com
Do you have a spam issue on this blog; I also am
a blogger, and I was wanting to know your situation; we have created some
nice practices and we are looking to exchange methods with
others, please shoot me an email if interested.
Feel free to surf to my weblog: pakovanje
Howdy, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam feedback?
If so how do you stop it, any plugin or anything you
can recommend? I get so much lately it's driving me crazy so any support is very much appreciated.
My weblog :: winnipegarts.ca
Would you mind if I quote a few of your blog posts as long as I provide credit and
sources back to your site: http://www.blogger.com/comment.
g?blogID=7971914456108766276&postID=488225285413238213.
I am going to aslo be certain to give you the appropriate
anchortext hyperlink using your website title: Blogger:
价值投资苦旅. Please be sure to let me know if this is
acceptable with you. Thanks!
my web-site: stump removal
Hiya! Quick question that's entirely off topic. Do you know how to make your site mobile friendly? My website looks weird when viewing from my apple iphone. I'm trying to
find a template or plugin that might be able to fix this issue.
If you have any recommendations, please share. Many thanks!
Here is my page: recovery
发表评论