我有一个网格图像库。我想有灰色网格线边界之间的所有图像图片,只有内部的,而不是外部的线。我该怎么做呢?阅读所有文档,寻找网格线颜色属性。
有人知道CSS或HTML中的属性吗?我会有不同的图片配置。
.card {
border-color: #D3D3D3;
border-style: solid;
border-width: 1px;
width: 100%;
margin-right: 0;
padding: 0;
}
.card-header {
background-color: white;
}
.card-body {
background-color: white;
}
.cardcheckbox {
position: absolute;
right: 5px;
top: 5px;
/*vertical-align: middle;
float: right;*/
visibility: hidden;
}
input[type=checkbox]:checked {
visibility: visible;
}
.card:hover .cardcheckbox {
visibility: visible;
}
.material-icons {
display: inline-flex;
vertical-align: top;
}
.card-header .accordion-toggle {
&.collapsed:after {
font-family: 'Material Icons';
content: "\e5cf";
}
&:after {
font-family: 'Material Icons';
content: "\e5ce";
float: right;
color: grey;
}
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div class="card" style="width: 30.00rem">
<div aria-multiselectable="true" class="accordian md-accordion" id="accordionEx" role="tablist">
<div class="grid-container" id="gridid531937b3b9b54801ab80573cf91d0852" style=" display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(1, 1fr);
grid-gap: 0em;
padding: 0px;
align-items: stretch;
position: relative; "><input class="cardcheckbox" id="checkid" type="checkbox"><img id="imgid531937b3b9b54801ab80573cf91d08520" src="https://www.woodlandtrust.org.uk/media/100078482/Sycamore01.jpg?cb=-11897985&preset=gallery-tab-main-image" style="max-width: 100%; max-height: 100%; padding: 0px; background-color: white;"><img id="imgid531937b3b9b54801ab80573cf91d08521" src="https://statesymbolsusa.org/sites/statesymbolsusa.org/files/styles/symbol_thumbnail__medium/public/primary-images/Applesfreshpicked.jpg?itok=YmYkBfY7" style="max-width: 100%; max-height: 100%; padding: 0px; background-color: white;"><img id="imgid531937b3b9b54801ab80573cf91d08522" src="https://openbookphilly.com/wp-content/uploads/2016/11/bookstack.png" style="max-width: 100%; max-height: 100%; padding: 0px; background-color: white;"></div>
<div class="card-header" id="headingOne1" role="tab"><a aria-controls="id531937b3b9b54801ab80573cf91d0852" aria-expanded="true" class="accordion-toggle collapsed" data-parent="#accordionEx" data-toggle="collapse" href="#id531937b3b9b54801ab80573cf91d0852">Tree</a></div>
<div aria-labelledby="headingOne1" class="collapse" data-parent="#accordionEx" id="id531937b3b9b54801ab80573cf91d0852" role="tabpanel">
<div class="card-body">Tree with leaves</div>
</div>
</div>
</div>
1条答案
按热度按时间au9on6nz1#
您可以使用grid-template-columns来实现这一点。
汽车;
超文本标记语言
为了帮助你形象化,我创建了一个示例代码
http://plnkr.co/edit/gIeumXLt0k3FPVCgGlDd?p=preview
希望能帮上忙
干杯!