所以我已經知道很多人都問過這個。如這裏:CSS背景重複圖片保證金頂部
css start repeating background from defined position
Background position, margin-top?
css start repeating background from defined position
Background Margin-top effect with CSS
我從字面上嘗試了所有的這些方法,正確的,而且它不工作。我試圖從頂部或「正常」位置開始重複背景100px。
<style>
.moiraitable{
width:500px;
background-image: url("http://i.imgur.com/owEfTJa.png");
background-repeat: repeat-y;
background-position: center 100px;
background-size: 510px;
}
</style>
<div class="moiraitable">
<img src="http://i.imgur.com/EXYfcOt.png" style="width:500px;margin:0 auto;" />
<p style="text-align:justify;margin:10px 40px;color:white;">
Proin iaculis pharetra tempus.
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
Vestibulum tincidunt justo nec orci tempus, quis sagittis lacus eleifend. Praesent id justo eget magna lacinia feugiat. In a risus commodo, consectetur diam id, pellentesque quam. Vivamus accumsan vehicula ligula, in tristique lorem scelerisque sed. Aliquam ante urna, bibendum adipiscing tincidunt eu, posuere non turpis. Vivamus vitae porta urna. Suspendisse consequat nisi semper lectus ullamcorper, et tempus augue convallis. Duis ante lacus, bibendum eget diam at, dignissim blandit dui. Nunc placerat purus vel arcu feugiat, viverra semper velit tristique. Proin magna lectus, bibendum ac lectus at, semper sagittis nunc. Duis ornare quam ac convallis sagittis. Nam convallis quis urna eu vestibulum. Aenean vitae pellentesque quam, non ultricies tortor.
</p>
</div>
什麼是 「不工作」? –
我試圖完成的是什麼-.-「 – user3024230
...那就是? –