How to fill the screen with css style
This article mainly explains "how to use css style to fill the screen", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to use css style to fill the screen" bar!
In css, you can use the "background-size:cover;" style to fill the screen. The function of the "background-size" property is to set the size of the background picture. When the property value is "cover", the background picture will expand large enough to make the background picture fully fill the screen.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
Which css style can fill the screen with pictures?
In css, you can use the background-size attribute to make the picture fill the entire screen. First of all, we set the picture as the background picture of body. At this time, you can fill the screen with the background-size attribute. The function of this attribute is to specify the size of the background image.
When the value of this attribute is cover, the background image is expanded to be large enough so that the background image completely covers the background area. Some parts of the background image may not be displayed in the background positioning area.
Examples are as follows:
Title body {background-size: cover;}
Output result:
Thank you for your reading, the above is the content of "how to use css style to fill the screen". After the study of this article, I believe you have a deeper understanding of how to use css style to make pictures fill the screen. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!