Home  >  Article  >  Web Front-end  >  What does background mean?

What does background mean?

不言
不言Original
2019-02-01 13:56:1816169browse

We often use the background attribute when learning CSS, so what does background mean? This article will introduce you to the relevant content about background.

What does background mean?

What does background mean?

Background means background. We can use the background attribute to define the background effect of the element.

Let’s see what effects can be Using background to define what effects

background-color: background color

background-image: background image

background-repeat:Background tiling

background-attachment:Background fixed

background-position:Background position

Let’s look at the code example of the background attribute

Let’s take a look at the simplest example, set the background color to pink

The code is as follows

<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-color: pink;
}
</style>
</head>
<body>

<h1>php中文网</h1>

<p>这个页面背景颜色是粉色的!</p>

</body>
</html>

The running effect is as follows

What does background mean?

I won’t go into details about the application of other background attributes here. You can refer to the content in CSS Dictionary on the php Chinese website.

The above is the detailed content of What does background mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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