Html 我如何通过高度来拉伸我的图像?
我正试图从网站制作我的背景,所以若我使用移动设备,它会将其中心的高度拉伸。 从那到那 我的代码是:Html 我如何通过高度来拉伸我的图像?,html,css,Html,Css,我正试图从网站制作我的背景,所以若我使用移动设备,它会将其中心的高度拉伸。 从那到那 我的代码是: body{ background-image: url("Tie_logo_shaders.jpg"); background-color: black; background-size: 100% 100%; background-size: cover; background-repeat: no-repeat; } 尝试此代码 .bg im
body{
background-image: url("Tie_logo_shaders.jpg");
background-color: black;
background-size: 100% 100%;
background-size: cover;
background-repeat: no-repeat;
}
尝试此代码
.bg img{
背景:url(“https://s-media-cache-ak0.pinimg.com/originals/27/3e/43/273e43a71854d8359186ecc348370f8d.jpg)无重复中心;
最小高度:100%;
位置:相对位置;
}
html,正文{
保证金:0;
填充:0;
身高:100%;
}
试试这个@我做了,它在小屏幕上工作得很好,但在大屏幕上它做得像