div即使覆盖背景尺寸也不会覆盖

时间:2018-10-17 20:36:31

标签: html css background-size

The picture of how it looks

我试图在整个屏幕上制作divs宽度,但是在身体可见的地方有一个小切口,我不想再看到它了

身体

body {
background-image: url(bild/backgrund-index.png);
background-repeat: no-repeat;
background-color: transparent;
font-family: minFont;
background-size:cover;
background-attachment: fixed;

}

图片中显示的两个div的css

.lean {
 height:1000px;
 background-image:url(bild/forstaSidaForklaringUtanText.png);
 font-family:'Segoe Script';
 font-size:200px; 
 background-repeat:no-repeat;
 Width:100%; 
 background-size: cover;
 background-clip: border-box;
 text-align:center; 
 clear:both;
 color:rgba(255,255,255,1);

 top:25%;   
  }

.nice {


background-image:url(bild/chiligryta.jpg);
font-family: minFont;
font-size:16px;

min-height: 1000px;
top:20%;


background-attachment: fixed;
background-size: cover;
background-position: center;
background-repeat: no-repeat;

}

0 个答案:

没有答案