background-color 属性设置元素的背景颜色。 background-color 属性为元素设置一种纯色。这种颜色会填充元素的内容、内边距和边框区域,扩展到元素边框的外边界(但不包括外边距)。如果边框有透明部分(如虚线边框),会透过这些透明部分显示出背景色。 transparent 值 尽管在大多数情况下,没有必要使用 transparent。不过如果您不希望某元素拥有背景色,同时又不希望用户对浏览器的颜色设置影响到您的设计,那么设置 transparent 值还是有必要的。
To achieve this effect we used CSS to change the background image of the banner, the icon next to the selected menu item, and the color of the bottom border.
为了实现这种效果,我们使用 CSS 改变广告条的背景图像、选择的菜单条目旁边的图标以及底边框的颜色。
For example, at the top of the CSS file, the body HTML selector redefines the font and background color of the entire browser application page.
例如,在CSS文件的顶部,body HTML选择符重新定义整个浏览器应用程序页面的字体和背景颜色。
As an example, the background color could be set to alternate every hour using CSS expressions.
为例,背景颜色可能被交替使用CSS表达式每小时的设置。
background-color 属性设置元素的背景颜色。 background-color 属性为元素设置一种纯色。这种颜色会填充元素的内容、内边距和边框区域,扩展到元素边框的外边界(但不包括外边距)。如果边框有透明部分(如虚线边框),会透过这些透明部分显示出背景色。 transparent 值 尽管在大多数情况下,没有必要使用 transparent。不过如果您不希望某元素拥有背景色,同时又不希望用户对浏览器的颜色设置影响到您的设计,那么设置 transparent 值还是有必要的。
应用推荐