background-image不放大
时间: 2023-08-31 17:09:30 浏览: 138
background-images
回答: 当使用background-image属性时,如果不指定background-size属性,图片不会被放大。\[1\]这意味着图片将按照其原始大小显示在背景中,不会被拉伸或缩放。如果图片比背景区域小,那么图片将被重复平铺以填充整个背景区域。如果图片比背景区域大,那么图片将被裁剪以适应背景区域。\[2\]所以,如果你希望背景图片不被放大,只需不设置background-size属性即可。
#### 引用[.reference_title]
- *1* [background-image的用法](https://blog.csdn.net/lxiaopfeng/article/details/52484740)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [Qt QSS中 background-image,border-image,以及image属性差别](https://blog.csdn.net/qq_39280795/article/details/128084732)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文