CSS颜色与背景颜色与背景颜色? [英] CSS color vs. background-color vs. background?

查看:141
本文介绍了CSS颜色与背景颜色与背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在HTML中,我什么时候使用颜色,background-color和background标签之间有什么区别?

In HTML when do I use color, and what is the difference between background-color and also the background tag?

有什么区别?

推荐答案

color指的是该元素中的文本颜色.

color is referring to the text color in that element.

background-color是指背景色

background是将许多背景标记合并为一行的简写.

background is shorthand to combine many background tags into one line.

background: #ffffff url("img_tree.png") no-repeat right top;

将颜色,图像和背景图像属性合并在一行中,而不是分别键入每种样式.

Combines color, image and background image properties in the one line instead of typing our each style individually.

w3schools

这篇关于CSS颜色与背景颜色与背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆