0
我面临的一个问题是,将主页面布局中的标题拆分为左下角至右上角。我找到的所有资源都将它们分成两种颜色。但是,当我想添加图片时,我看不到任何结果。使用CSS将标题页面拆分为图像
见我做的代码,我不知道如何消除它们之间的空间
class-image-1 {
background-image: url(/img/imag-1-bg.png);
height: 100vh;
-webkit-clip-path: polygon(1px 100vh,100% 1px,311px -1px,0px 0px);
background-repeat: no-repeat;
position: relative;
background-position: center;
background-size: cover;
background-attachment: fixed;
margin: 0 auto;
}
class-image-2{
background-image: url(/img/bg.jpg);
height: 100vh;
-webkit-clip-path: polygon(0px 100vh,100% 100vh,100% 1px);
position: relative;
background-position: center;
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
margin: 0 auto;
}
我做了上述相同的代码,但我想他们在一个页面的图像之间有空间。只是为了清楚地看到这个图像,它可能会给你一个想法。
你不能与线性gradien使用图像。你能解释一下你需要达到什么吗? –
@TemaniAfif你能看到我的更新问题 – Abdullah
我投票重新打开它,因为它更清楚,希望你会得到更多的选票;)@Blazemonger –