html - 如何给三 Angular 形设置边框

标签 html css

我尝试为三 Angular 形设置黑色实心 1px 边框:jsFiddle .我写了以下标记:

<div>
</div>

和样式

div{
    position: absolute;
    left:0px; 
    top:0px;
    width: 0;
    height: 0; 
    border-left: 5px solid transparent; 
    border-right: 5px solid transparent; 
    border-bottom: 10px solid red;
}

但我不明白在这种情况下如何为三 Angular 形设置边框。

最佳答案

你也可以试试这个,基本上我做了一个更大的黑色三 Angular 形,把它放在红色的后面

<div id="border">  
</div>

 <div id="red">
 </div>


#red{
    position: absolute;
    left:4px; 
    top:9px;
    width: 0;
    height: 0; 
    border-left: 5px solid transparent; 
    border-right: 5px solid transparent; 
    border-bottom: 10px solid red;
    background-color:transparent;
    z-index: 99;
}

#border {
    position: absolute;
    left:0x; 
    top:0px;
    width: 5px;
    height: 10px; 
    border-left: 6px solid transparent; 
    border-right: 6px solid transparent; 
    border-bottom: 12px solid black;
    z-index: 0;
}

关于html - 如何给三 Angular 形设置边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22249307/

相关文章:

c# - C#中的缓存内存模拟

javascript - 防止 WordPress 自动格式化页面 HTML

html - 单元格高度是 webkit 浏览器中忽略的东西

javascript - 当用户在 chosen select 中选择一个或多个选项时,是否可以使用不同的颜色?

html - 溢出覆盖的 div

css - 使用延迟的链接转换都不起作用

javascript - 在 jquery 中正确使用 $(this)

javascript - Span 标记中的随机数 JavaScript

html - 如何更改 CSS 过渡的起始位置?

css - 了解父子关系(固定 block )CSS