CSS webpage creation skills-control webpage background

Source: Internet
Author: User

[Introduction]
I think people often worry about some pictures that are suitable for their webpage backgrounds. I think so too, because these pictures are too big, too small, or too messy, is there a way to make images fit your homepage appetite? The answer is yes.
I want to know how to implement it. Well, we are now working with you. I promise you will be able to do it as soon as you learn it. However, my friends who want to create a family on the Internet are generally divided into "opening a business" in an Internet cafe (just like me, I started to pull relevant code from others' homepages to change it ), in addition, professional software such as DW or FP is used for uploading in my own house. Therefore, I plan to introduce it in two separate steps, first, let's take a look at the "opening" friends in the Internet cafe. Finally, let's briefly introduce some background styles made with dw4.
In fact, everything is the same, but the method is different. Now, let's get down to the topic.
When it comes to the background, only the background color and color image are available. I think you must all know to add bgcolor = "#808080" and background = "URL" to it, right, but I will introduce it here, instead of doing this, but using CSS styles. Although it is troublesome, the overall cooperation is still very good.
· Background color background-color
I don't need to introduce the color code any more. What I want everyone to know is that the color code is represented either in English or by the specified code. The default value is transparent (transparent ).
Example: body {background-color: yellow}
H1 {back ground-color: #000000}
· Background image background-image
The settings of background images and background colors in HTML are also basically the same. You can add related statements to the settings. But here, I am not referring to this method. I am still using CSS. The main function of background-image is to display images. If you want to display images, you only need to add a url (image address) to the image, that's the easiest thing to do. Just do nothing, because the default value is none. If you want to add it, you can add this none.
Example: body {background-image: url ('File &: // C:/WINDOWS/BACKGRND. GIF ')}
H1 {background-image: url ('none ')}
When you are using background images, you will often encounter images that are too small to repeat, which damages the aesthetic of the entire page, it may be difficult to change to another image. But now, as long as you use the following CSS to control the image method, you will not have such troubles in the future.
· Whether the image is repeatedly displayed as background-repeat
Sometimes Repeated display is needed, but sometimes repeated display is a headache. Now it can help you well, in addition, it can also help you control how images are repeated (horizontal, vertical, and both ), to achieve the repetition of these three directions, you only need to add repeat-x (horizontal) and repeat-y (vertical) after bcackground-repeat) and repeat ).

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.