CSS中背景图像的边距
我在一个div上有一个背景图像,div的大小设置为图像的大小,但是,我无法删除显示在左侧的边距。见下面的CSSCSS中背景图像的边距,css,Css,我在一个div上有一个背景图像,div的大小设置为图像的大小,但是,我无法删除显示在左侧的边距。见下面的CSS .faders-image { background-image: url(../images/background.jpg); background-repeat: no-repeat; position: fixed; width: 512px; height: 512px; right: 0rem; bottom: 0rem; margin:
.faders-image {
background-image: url(../images/background.jpg);
background-repeat: no-repeat;
position: fixed;
width: 512px;
height: 512px;
right: 0rem;
bottom: 0rem;
margin: 0;
border: none;
padding 0;
-webkit-opacity: 0.50;
z-index: 8;
}
如果页面左边距有问题,可以使用以下样式
.faders-image {
background-image: url(heart-icon.png);
background-repeat: no-repeat;
position: fixed;
width: 512px;
height: 512px;
left: 0;
bottom: 0rem;
margin: 0;
border: none; padding 0;
-webkit-opacity: 0.50;
z-index: 8;
}
我已将样式
right:0rem
更改为left:0代码>请提供实时预览,例如。g。在JSFiddle.net上,如果添加背景位置:左上角代码>?是否设置了*{margin:0;padding:0;}
?这将删除DOM元素的所有边距和填充,除非另有指定代码>而不是填充:0代码>也许这就是你的问题-webkit前缀在不透明度上已经不需要200年了。也许更多。