当前位置:网站首页>Set the maximum width of the body, but why does the background color of the body cover the whole page?
Set the maximum width of the body, but why does the background color of the body cover the whole page?
2022-04-23 09:21:00 【Small white egg tart】
When html When the label has no background style ,body The background color is not body The background color of the label , It's the whole page . once html The label contains a background color , be body The background color becomes normal body The background color of the label , And at this time html The label is at the top , The background color is obtained by the browser , Become the background color of the whole page .
body {
min-width: 320px;
max-width: 750px;
margin: 0 auto;
height: 2000px;
line-height: 1.5;
font-family: Arial, Helvetica;
background-color: #F2f2f2;
}
For example, below , Only to body Specifies the background color , therefore body The background color becomes html Background color of .

When we give html After specifying the background color ,html The background color of becomes the background color of the whole page .

版权声明
本文为[Small white egg tart]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230624114501.html
边栏推荐
- #yyds干货盘点#ubuntu18.0.4安装mysql并解决ERROR 1698: Access denied for user ''root''@''localhost''
- DJ music management software pioneer DJ rekordbox
- The crawler returns null when parsing with XPath. The reason why the crawler cannot get the corresponding element and the solution
- STM32 and FreeRTOS stack parsing
- Go language self-study series | golang method
- 数据清洗 ETL 工具Kettle的安装
- SQL used query statements
- [indexof] [lastIndexOf] [split] [substring] usage details
- Using sqlmap injection to obtain the account and password of the website administrator
- npm ERR! network
猜你喜欢

nn. Explanation of module class

Principle of synchronized implementation

Brush classic topics

Harbor enterprise image management system

Two methods of building Yum source warehouse locally

108. 将有序数组转换为二叉搜索树

Non duplicate data values of two MySQL query tables

Download and install bashdb

npm ERR! network

Failed to download esp32 program, prompting timeout
随机推荐
员工试用期转正申请书(泸州老窖)
JS prototype chain
I don't understand time, timestamp and time zone. Look at this article
How does kubernetes use harbor to pull private images
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
Detailed explanation of delete, truncate and drop principles in MySQL database
Go language self-study series | golang structure pointer
RSA encryption and decryption signature verification
The crawler returns null when parsing with XPath. The reason why the crawler cannot get the corresponding element and the solution
node安装
Flink SQL realizes the integration of stream and batch
Summary of wrong questions 1
Go language learning notes - structure | go language from scratch
Secrets in buffctf file 1
Program, process, thread; Memory structure diagram; Thread creation and startup; Common methods of thread
npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
Kettle experiment (III)
Learn FPGA (from Verilog to HLS)
ASUS laptop can't read USB and surf the Internet after reinstalling the system
How to render web pages