当前位置:网站首页>解决背景图设置100%铺满时,缩放浏览器出现水平滚动条时,滚动条超出的部分背景图没有铺满的问题
解决背景图设置100%铺满时,缩放浏览器出现水平滚动条时,滚动条超出的部分背景图没有铺满的问题
2022-07-26 00:21:00 【凡小多】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style> *{
margin:0;padding:0} .wrap{
height: 40px; width: 1000px; background-color: #ccc; } .box{
background: url('/img.png'); background-size: 100% 100%; } </style>
</head>
<body>
<div class="wrap">
<div class="box">example</div>
</div>
</body>
</html>
当视口宽度小于1000时,实际body元素的宽度没有被撑开到1000PX。而是按默认设置为“浏览器可视窗口的宽度”和”min-width”属性中的最大值来解析的。
**解决方法:**给父元素设置min-width(或者给body设置min-width)
body {
min-width: 1000px;
}
边栏推荐
- 快速入门顺序表链表
- Sliding window_
- 计算物理期刊修改
- Understanding of "dof: a demand oriented framework for imagedenoising"
- 8个小妙招调整数据库性能优化,yyds
- Revision of Journal of Computational Physics
- 对“DOF: A Demand-oriented Framework for ImageDenoising“的理解
- 数据流通交易场景下数据质量综合管理体系与技术框架研究
- Pinduoduo gets the usage instructions of the product details API according to the ID
- nodejs启动mqtt服务报错SchemaError: Expected `schema` to be an object or boolean问题解决
猜你喜欢

Nest.js 用了 Express 但也没完全用

牛血清白蛋白修饰牛红细胞超氧化物歧化酶SOD/叶酸偶联2-ME白蛋白纳米粒的制备

Nodejs surface longitude

Azure Synapse Analytics 性能优化指南(1)——使用有序聚集列存储索引优化性能

数据流通交易场景下数据质量综合管理体系与技术框架研究

Bond network card mode configuration

Installation and configuration of VMware esxi7.0

Pinduoduo gets the usage instructions of the product details API according to the ID

JVM Tri Color marking and read-write barrier

Sorting out the encapsulation classes of control elements in appium
随机推荐
寻找命令find和locate
本地电脑架设传奇怎么开外网叫朋友一起玩?
Research on the influence of opinion leaders based on network analysis and text mining
Sorting out the encapsulation classes of control elements in appium
Detailed explanation of C language preprocessing
FreeRTOS personal notes - mutex
Packet switching and label switching in MPLS
Research on the integrated data quality management system and technical framework under the scenario of data circulation and transaction
Instructions for pinduoduo's API to get the list of goods according to keywords
Solve page refresh without attaching data
对比7种分布式事务方案,还是偏爱阿里开源的Seata(原理+实战)
2022/7/19 考试总结
Azure Synapse Analytics 性能优化指南(1)——使用有序聚集列存储索引优化性能
测试7年,面试华为最后面议要薪1万,HR说我不尊重华为,他们没有那么低薪资的岗位~
【目录】mqtt、nodejs项目
letfaw
Matlab makes the image of serial port output data in real time
快速入门顺序表链表
Redis夺命十二问,你能扛到第几问?
SQL time splicing problem, splicing recovery automatically truncated by the system