Html 如何去除div背景图像之间的车身背景色

Html 如何去除div背景图像之间的车身背景色,html,css,Html,Css,在div背景图像之间有白色条纹 屏幕截图: 代码: 正文{ 颜色:白色; 字体系列:monospace; 字体大小:20px; 文本对齐:居中; } h1{ 字体大小:100px; 左边距:自动; 文本对齐:居中; } .社交媒体img{ 高度:100px; 宽度:100px; 边界半径:40px; } #剖面图{ 高度:250px; 宽度:250px; 边框样式:隐藏; 边界半径:25px; } .相册{ 高度:150像素; 宽度:150px; } #介绍{ 背景图片:url(https:

在div背景图像之间有白色条纹

屏幕截图:

代码:
正文{
颜色:白色;
字体系列:monospace;
字体大小:20px;
文本对齐:居中;
}
h1{
字体大小:100px;
左边距:自动;
文本对齐:居中;
}
.社交媒体img{
高度:100px;
宽度:100px;
边界半径:40px;
}
#剖面图{
高度:250px;
宽度:250px;
边框样式:隐藏;
边界半径:25px;
}
.相册{
高度:150像素;
宽度:150px;
}
#介绍{
背景图片:url(https://www.clipartsgram.com/image/533949003-dark-abstract-1920x1080-wallpaper-2.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#投资组合{
背景图片:url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#娱乐{
}
.navbar.navbar导航{
显示:内联块;
浮动:无;
}
.导航栏.导航栏塌陷{
文本对齐:居中;
}
人力资源{
不透明度:0.5;
}

我的网站 生物:
生物生产线1
生物生产线2







在社交媒体上关注我



我的“无”投资组合:











这里有一些自相矛盾的设置:

#portfolio {
   background-image: url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-size:cover;
    background-position:center-top;
    background-position-x: 50%;
    background-position-y: 0%;
}
只需擦掉底部的三个,就可以了

#portfolio {
  background-image: url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
  background-repeat:no-repeat;
  background-attachment:fixed;
  background-size:cover;
}
cover
足以填充DIV,与下面的设置相矛盾


顺便说一下,另一个DIV也是如此。

这里有一些自相矛盾的设置:

#portfolio {
   background-image: url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-size:cover;
    background-position:center-top;
    background-position-x: 50%;
    background-position-y: 0%;
}
只需擦掉底部的三个,就可以了

#portfolio {
  background-image: url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
  background-repeat:no-repeat;
  background-attachment:fixed;
  background-size:cover;
}
cover
足以填充DIV,与下面的设置相矛盾


顺便说一句,另一个DIV也是如此。

我猜在
我的无名小卒的公文包:
元素上有一个
边距
样式(可能是默认的浏览器样式),它向下推整个
公文包
容器

尝试重置h2的边距,并使用如下填充方式将其向下推:

h2 {
  margin: 0;
  padding: 20px 0;
}

我猜在
我的无内容的公文包:
元素上有一个
边距
样式(可能是默认的浏览器样式),它向下推整个
公文包
容器

尝试重置h2的边距,并使用如下填充方式将其向下推:

h2 {
  margin: 0;
  padding: 20px 0;
}

h2
中删除边距并删除

以删除空格

在css中添加
h2{margin:0}

正文{
颜色:白色;
字体系列:monospace;
字体大小:20px;
文本对齐:居中;
}
h1{
字体大小:100px;
左边距:自动;
文本对齐:居中;
}
.社交媒体img{
高度:100px;
宽度:100px;
边界半径:40px;
}
#剖面图{
高度:250px;
宽度:250px;
边框样式:隐藏;
边界半径:25px;
}
.相册{
高度:150像素;
宽度:150px;
}
#介绍{
背景图片:url(https://www.clipartsgram.com/image/533949003-dark-abstract-1920x1080-wallpaper-2.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#投资组合{
背景图片:url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#娱乐{
}
.navbar.navbar导航{
显示:内联块;
浮动:无;
}
.导航栏.导航栏塌陷{
文本对齐:居中;
}
人力资源{
不透明度:0.5;
}
氢{
保证金:0;
}

我的网站 生物:
生物生产线1
生物生产线2







在社交媒体上关注我


我的“无”投资组合:











h2
中删除边距,并删除

以删除空格

在css中添加
h2{margin:0}

正文{
颜色:白色;
字体系列:monospace;
字体大小:20px;
文本对齐:居中;
}
h1{
字体大小:100px;
左边距:自动;
文本对齐:居中;
}
.社交媒体img{
高度:100px;
宽度:100px;
边界半径:40px;
}
#剖面图{
高度:250px;
宽度:250px;
边框样式:隐藏;
边界半径:25px;
}
.相册{
高度:150像素;
宽度:150px;
}
#介绍{
背景图片:url(https://www.clipartsgram.com/image/533949003-dark-abstract-1920x1080-wallpaper-2.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#投资组合{
背景图片:url(http://www.marcysalisbury.com/wp-content/uploads/2011/09/background-dark1.jpg);
背景重复:无重复;
背景附件:固定;
背景尺寸:封面;
背景位置:中上;
背景位置x:50%;
背景位置y:0%;
}
#娱乐{
}
.navbar.navbar导航{
显示:内联块;
浮动:无;
}
.导航栏.导航栏塌陷{
文本对齐:居中;
}
人力资源{
不透明度:0.5;
}
氢{
保证金:0;
}