css - 这可能只在 css 中制作 "double sort"图标吗?

标签 css

<分区>

有没有办法只在 css 中制作这种图标?

enter image description here

我知道我可以从 font-awesome 获取这个图标,但我需要一种只在 CSS 中制作它的方法。

最佳答案

这是可能的。我创建了一个主要的 div 包装器作为 flex box。这包含两个子 div。有创建三 Angular 形的 css 命令。

.wrapper
{
  display:flex;
  flex-direction:column;
  padding:5px;
}

.top
{
  
  width: 0; 
  height: 0; 
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  
  border-bottom: 20px solid black;
  margin-bottom:5px;
}

.bottom
{

  width: 0; 
  height: 0; 
  
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 20px solid #f00;
}
<div class="wrapper">
  <div class="top">
  </div>
  <div class="bottom">
  </div>

</div>

关于css - 这可能只在 css 中制作 "double sort"图标吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58509500/

上一篇:html - CSS 中一个 div 或表格的两个滚动条

下一篇:javascript - 将 Div 的内容放在顶部

相关文章:

html - 如何将内容放入框中并使其响应?

css - 中间的单选按钮,两侧各有两列文本/选项

隐藏下拉列表选项的Javascript解决方案

html - 如何在 mat-card-header 的左侧和右侧设置元素组?

css - 使左侧文本垂直居中

javascript - 无法将变量的值从 true 更改为 false

html - 如何为消息栏自动留边距

html - 与 chrome 相比,为什么 Safari 对待转换的方式不同?

javascript - 如何设置点击的<a>标签样式?

html - Bootstrap 全屏轮播