css background属性_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:53
Original
1131 people have browsed it

Background shorthand property sets all background properties in one declaration.

All browsers support the background attribute.

Note: IE8 and earlier browsers do not support multiple background images for one element.

Note: IE7 and earlier browsers do not support "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".

can set the following attributes:
?background-color
?background-position
?background-size
?background-repeat
?background-origin
? background-clip
?background-attachment
?background-image

If you don’t set one of the values, there will be no problem, such as background:#ff0000 url('smiley.gif' ); is also allowed.

It is generally recommended to use this attribute instead of using individual attributes individually, as it is better supported in older browsers and requires fewer letters to be typed.

Example:
body
{
background: #00FF00 url(bgimage.gif) no-repeat fixed top;
}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!