Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 当页面缩小时,如何使边框消失?_Css_Responsive Design_Border - Fatal编程技术网

Css 当页面缩小时,如何使边框消失?

Css 当页面缩小时,如何使边框消失?,css,responsive-design,border,Css,Responsive Design,Border,我想知道,当屏幕尺寸变得太小时,是否有一种纯粹的css或引导方法可以让元素上的边框消失?这是因为我有3列,它们之间有一个边框,就像这样col | col | col,当页面变得太小时,它们看起来像这样 col |col| col 我不想将边框放在中间栏上。有什么想法吗?当边框太小时,您可以对这些边框进行媒体查询,并将其更改为display:none 例如,如果你有这样的东西: .vertical-border { height: 200px; } 您可以添加: @media scre

我想知道,当屏幕尺寸变得太小时,是否有一种纯粹的css或引导方法可以让元素上的边框消失?这是因为我有3列,它们之间有一个边框,就像这样
col | col | col
,当页面变得太小时,它们看起来像这样

 col
|col|
 col

我不想将边框放在中间栏上。有什么想法吗?

当边框太小时,您可以对这些边框进行媒体查询,并将其更改为
display:none

例如,如果你有这样的东西:

.vertical-border {
  height: 200px;
}
您可以添加:

@media screen and (max-width: 300px) {
  .vertical-border {
    display: none;
  }
}
类似地,如果边框是元素本身的属性,则可以在媒体查询中覆盖边框属性

border: 0;

有关媒体查询的更多信息可在此处找到:

我将实现边界:0;谢谢你的快速回复!