4 Approaches to creating an HTML page background - millertencephad
HTML paginate background: Good old CSS property – the backdrop is the main element with which we bottom control the background when creating a website aim.
In this lesson, we will examine the 4 most common approaches to creating the background of an Hypertext mark-up language Page.
If you are sunrise to web design, you will bump for yourself few basic techniques for workings with CSS, which you can then put into rehearse when creating your website.
1. The plain background color of the HTML page
body { background-color: #a1bad1; } This is the easiest way to set the background of an HTML page using the BODY tag. In this guinea pig, no images are ill-used to create the scop, the background color is dictated using the value: #a1bad1.
2. Horizontally and vertically perennial images American Samoa a page background
body { background-color: #a1bad1; background-image: url(images/pattern.png); } As images for such a background, diametrical textures rump be used, from simple and deep-eyed lines to images containing complex patterns. By nonpayment, the background persona will be repeated in both directions on the X and Y bloc, so there is no pauperism to specify this in CSS.
Here you need to properly make an image that will be used as a backclot. The image must be cut out so that in places where one image touches another, in that respect is nary viewable seam. Otherwise, in places where images touch, you bequeath see ugly lines that will spoil the whole scop.
Despite the fact that the background image is used as a background, still sets the HTML background color of the WWW page, as we did in the first example. This will bring home the bacon backdrop if the visitor who has visited the site has images disabled in the browser.
3. The background image is perennial horizontally
consistency { background-color: #a1bad1; background-image: url(images/gradient.jpg); background-take over: repeat-x; } The backdrop image in CSS can be repeated entirely on the X-axis or only on the Y-axis. The recur-x economic value is commonly wont to add a slope to different elements, especially used for elements used as buttons. A gradient image cut out by a thin strip can be used American Samoa a background simulacrum that repeats horizontally across the entire pageboy.
By default, the image will be located at the top of the page, only the revolve about or bottom values can also be used. The background color of the paginate should be primed the like the last color of the gradient envision. This will ensure a smooth transition from the gradient at the place of the foliate where the picture victimised arsenic the screen backgroun ends and the background color of the foliate begins.
4. Brobdingnagian picture as a varlet background
body { background-color: #a1bad1; background-image: url(images/bg-image.jpg); background-berth: center top side; background-repeat: no-repeat; } The paradigm files used to create such a background should make up small in size. Although the file size of a large scop image will comprise larger than small repetitive images, applying compression to it can significantly reduce the size of the image. Irrespective how large the background images are, scrolling the page ends at a certain point. Therefore, it is necessary to put away the background color of the page to pretend a unlined transition from the background image to the background vividness. This example uses a large epitome that is positioned in the pore at the top of the web page.
You have Successfully Subscribed!
Source: https://sprintally.com/creating-an-html-page-background/
Posted by: millertencephad.blogspot.com

0 Response to "4 Approaches to creating an HTML page background - millertencephad"
Post a Comment