是否可以在以下条件下获得无缝模式重复?
想法是有一个带有固定附件的旋转背景。我认为这应该是如何工作的,但是有什么方法可以实现吗?
body {
padding: 50px;
margin: 0;
height: 10000px;
}
.main {
width: 100%;
height: 1300px;
box-sizing: border-box;
overflow: hidden;
border: 5px solid #7cb7b7;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.background {
background-image: url('https://thumbs.dreamstime.com/b/circles-seamless-pattern-10032830.jpg');
background-attachment: fixed;
background-repeat: repeat;
position: absolute;
top: -1000%;
left: -1000%;
right: -1000%;
bottom: -1000%;
transform: rotate(-15deg);
}
.text {
background: white;
border: 2px solid black;
width: 200px;
height: 70px;
display: flex;
justify-content: center;
align-items: center;
z-index: 1;
}
<div class="main">
<div class="background"></div>
<div class="text">
<p>Flex</p>
</div>
</div>