background-color 属性设置元素的背景颜色。 background-color 属性为元素设置一种纯色。这种颜色会填充元素的内容、内边距和边框区域,扩展到元素边框的外边界(但不包括外边距)。如果边框有透明部分(如虚线边框),会透过这些透明部分显示出背景色。 transparent 值 尽管在大多数情况下,没有必要使用 transparent。不过如果您不希望某元素拥有背景色,同时又不希望用户对浏览器的颜色设置影响到您的设计,那么设置 transparent 值还是有必要的。
Combine your background images into a single image and use the CSS background-image and background-position properties to display the desired image segment.
将您的背景图像合并为单个图像并使用CSS背景图像及背景位置要显示所需的图像段的属性。
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 改变广告条的背景图像、选择的菜单条目旁边的图标以及底边框的颜色。
You'll also learn how to set up the Sprite using some basic CSS techniques (CSS background Sprite and CSS text image replacement).
同时你也会学习到应用基础CSS的技巧CSS背景图片翻转。
background-color 属性设置元素的背景颜色。 background-color 属性为元素设置一种纯色。这种颜色会填充元素的内容、内边距和边框区域,扩展到元素边框的外边界(但不包括外边距)。如果边框有透明部分(如虚线边框),会透过这些透明部分显示出背景色。 transparent 值 尽管在大多数情况下,没有必要使用 transparent。不过如果您不希望某元素拥有背景色,同时又不希望用户对浏览器的颜色设置影响到您的设计,那么设置 transparent 值还是有必要的。
应用推荐