当前位置:网站首页>Two methods for full screen adaptation of background pictures, background size: cover; Or (background size: 100% 100%;)
Two methods for full screen adaptation of background pictures, background size: cover; Or (background size: 100% 100%;)
2022-07-08 01:07:00 【Intelligent control and optimization decision Laboratory of Cen】
background: #000 url(img1.jpg) no-repeat fixed center center;
background-size: cover; perhaps (background-size: 100% 100%;)
Pay attention to writing well background Then write background-size, Otherwise it will be useless , Bear in mind , I wasted more than an hour here
100% and cover The difference between the two is roughly as follows
background-size in ,100% and cover Are used to enlarge or zoom the image to fit the entire container
background-size:100% 100%;--- Fill up in proportion to the container , Image distortion ;
background-size:cover;--- Enlarge the background image to fit the element container , The scale of the picture is the same , But be careful , The part beyond the container may be cut off .
I personally feel that background-size:100%,100%;
Better effect
Original picture
边栏推荐
- Codeforces Round #804 (Div. 2)
- [Yugong series] go teaching course 006 in July 2022 - automatic derivation of types and input and output
- 4.交叉熵
- How to transfer Netease cloud music /qq music to Apple Music
- 1. Linear regression
- 牛客基础语法必刷100题之基本类型
- 完整的模型验证(测试,demo)套路
- C# ?,?.,?? .....
- [necessary for R & D personnel] how to make your own dataset and display it.
- Mathematical modeling -- knowledge map
猜你喜欢
随机推荐
手机上炒股安全么?
股票开户免费办理佣金最低的券商,手机上开户安全吗
Introduction to paddle - using lenet to realize image classification method II in MNIST
STL -- common function replication of string class
Password recovery vulnerability of foreign public testing
133. Clone map
Using GPU to train network model
Basic mode of service mesh
Langchao Yunxi distributed database tracing (II) -- source code analysis
A network composed of three convolution layers completes the image classification task of cifar10 data set
Jemter distributed
炒股开户怎么最方便,手机上开户安全吗
AI遮天传 ML-回归分析入门
13.模型的保存和载入
2. Nonlinear regression
完整的模型验证(测试,demo)套路
2.非线性回归
The weight of the product page of the second level classification is low. What if it is not included?
[deep learning] AI one click to change the sky
国外众测之密码找回漏洞