当前位置:网站首页>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
边栏推荐
- Thinkphp内核工单系统源码商业开源版 多用户+多客服+短信+邮件通知
- SDNU_ACM_ICPC_2022_Summer_Practice(1~2)
- 串口接收一包数据
- What does interface testing test?
- STL--String类的常用功能复写
- Y59. Chapter III kubernetes from entry to proficiency - continuous integration and deployment (III, II)
- 【愚公系列】2022年7月 Go教学课程 006-自动推导类型和输入输出
- Where is the big data open source project, one-stop fully automated full life cycle operation and maintenance steward Chengying (background)?
- 8.优化器
- My best game based on wechat applet development
猜你喜欢
Get started quickly using the local testing tool postman
3.MNIST数据集分类
FOFA-攻防挑战记录
13. Enregistrement et chargement des modèles
Interface test advanced interface script use - apipost (pre / post execution script)
jemter分布式
语义分割模型库segmentation_models_pytorch的详细使用介绍
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
5. Over fitting, dropout, regularization
NVIDIA Jetson测试安装yolox过程记录
随机推荐
Course of causality, taught by Jonas Peters, University of Copenhagen
牛客基础语法必刷100题之基本类型
4.交叉熵
《因果性Causality》教程,哥本哈根大学Jonas Peters讲授
2.非线性回归
基于微信小程序开发的我最在行的小游戏
How to use education discounts to open Apple Music members for 5 yuan / month and realize member sharing
The weight of the product page of the second level classification is low. What if it is not included?
String usage in C #
Handwriting a simulated reentrantlock
A network composed of three convolution layers completes the image classification task of cifar10 data set
What has happened from server to cloud hosting?
手写一个模拟的ReentrantLock
Saving and reading of network model
Cross modal semantic association alignment retrieval - image text matching
For the first time in China, three Tsinghua Yaoban undergraduates won the stoc best student thesis award
133. 克隆图
股票开户免费办理佣金最低的券商,手机上开户安全吗
2. Nonlinear regression
Malware detection method based on convolutional neural network