如何编写一个 CSS 类使背景几乎全白?我想使底部为黑色并带有箭头图标。
.search-rect {
width: 160px;
height: 200px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 3px;
padding-right: 3px;
background-color: #fafafa;
border: 1px solid #424242;
border-radius: 10px;
text-align: center;
font-size: 10px;
p {
line-height: 150%;
}
}
最佳答案
您可以使用 ::before
和 ::after
伪元素。
像这样:https://codepen.io/bsalex/pen/WXLpPY
关于css - 如何用两种颜色制作一个背景?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47585773/