How to set the background in bootstrap

藏色散人
Release: 2021-12-28 17:10:38
Original
9909 people have browsed it

How to set the background of bootstrap: 1. Open the corresponding css file; 2. Set the page background through "background: url(../img/QQ picture 20200226123957.jpg) no-repeat;" .

How to set the background in bootstrap

The operating environment of this article: Windows 7 system, bootsrap3.3.7 version, Dell G3 computer.

bootstrap How to set the background?

How to use BootStrap to write a web page and set the background of a full-screen page:

It’s not ridiculous to say it, but the hands of this doubles game have almost forgotten how to write code Yes, when writing a page, when setting the background, inexplicable errors keep appearing.

Record it here, you can’t even know the background settings, even though the front-end is not very good. It also helps beginners or back-end workers avoid pitfalls when checking it out! ! !

You only need to write

body{
    background: url(../img/QQ图片20200226123957.jpg) no-repeat;
    background-size:100%;  
}
Copy after login

in the css. In other words, the reason I encountered at that time was the size problem. But in the end, what I found was that my previous css overridden this setting, so it kept failing.

Supplement:

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 separately, because this attribute is better supported in older browsers and requires fewer letters to be typed.

Default value: not specified
Inheritance: no
Version: CSS1 CSS3
JavaScript Syntax: object.style.background="white url(paper.gif) repeat-y"

Recommended related video tutorials: "bootstrap video tutorial

The above is the detailed content of How to set the background in bootstrap. For more information, please follow other related articles on the PHP Chinese website!

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!