2011-11-10 85 views
0

假设我有背景图像,其中width = 1000px,height = 1000px,我的Screen width = 800px。如何修剪,裁剪背景以获得-100px左侧和-100px边?Css裁剪背景(两侧)

+0

如果您有背景图像更宽的屏幕,你已经看到它裁剪。也许你想要中心你的背景图像? – Simone

回答

2
background-position:center center; 

,或者,如果你想它对齐顶端:

background-position:center top;