html - 具有平滑圆边的 CSS 三 Angular 形

标签 html css

我正面临新的、最艰巨的 CSS 挑战。我需要开发一个带有图标和文本的三 Angular 形框。我尝试了很多不同的方法,但我没能达到我想要的结果。请看我需要的图片。任何建议或代码将不胜感激。 enter image description here

<div class="outer-triangle">
    <div class="inner-triangle">
        <i class="fa fa-bathtub">
        <h2>Heading</h2>
        <p>This is testing for multi line paragraph</p>
    </div>
</div>

最佳答案

我能用纯 CSS 得到的最好结果如下:

enter image description here

您可以进一步研究代码,看看是否可以从这里获得更多信息。

let empty ='';
.roundTriangle {
  background: #006600;
  position: absolute;
  border-radius: 50%;
  border: 20px solid #006600;
  width: 20px;
  height: 20px;
}

.roundTriangle::after {
  position: absolute;
  content: '';
  width: 0px;
  height: 0px;
  bottom: -62px;
  left: -13.9px;
  border: 24px solid transparent;
  border-top: 30px solid #006600;
}
<div class="roundTriangle"></div>

关于html - 具有平滑圆边的 CSS 三 Angular 形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50167981/

相关文章:

javascript - 选择具有相同 URL id 的类

Jquery 模态对话框弹出 - 在所有浏览器中固定在屏幕中央

当嵌套在动态添加的 <div> 中时,JavaScript 事件不会触发

html - 使文本出现在按钮中间

html - 让按钮启动选项选择下拉菜单

javascript - 如何让浏览器停留在当前窗口

javascript - HTML 如何使用 JavaScript 显示计时器?

html - CSS 中的 Segoe UI Semilight 不适用于 Chrome

我网站上的 HTML 字幕文本移动速度怪异,但在 Chrome 中查看时,它完全没问题吗?

javascript - 阻止 body 集中注意力