CSS:将图像拉伸到 100% 宽度 [英] CSS: Stretching image to 100% width
本文介绍了CSS:将图像拉伸到 100% 宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好我正在尝试拉伸我身边的背景以适应宽度.我只在互联网上找到了很大的解决方法.这不是一个命令吗?
Hi all I am trying to strech the background of my side to fit the width. I only found big workarounds in the internet. Is there not one single command for this?
body {
background-image: url(money.jpg);
}
感谢您的回答.杜诺
推荐答案
使用背景-size 像下面使用的那个,
Use background-size like the one used below,
body {
background-image: url(money.jpg) no-repeat;
background-size: 100%;
}
一些有用的链接:
这篇关于CSS:将图像拉伸到 100% 宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文