CSS triangle custom border color

后端 未结 5 957
情话喂你
情话喂你 2020-11-22 13:28

Attempting to use a custom hex color for my css triangle (border). However since it uses border properties I am unsure how to go about doing this. I would like to steer clea

5条回答
  •  遇见更好的自我
    2020-11-22 13:37

    I know you accept that but check this one also with less css:

    .container {
        margin-left: 15px;
        width: 200px;
        background: #FFFFFF;
        border: 1px solid #CAD5E0;
        padding: 4px;
        position: relative;
        min-height: 200px;
    }
    
    .container:after {
        content: '';
        display: block;
        position: absolute;
        top: 10px;
        right:-7px;
        width: 10px;
        height: 10px;
        background: #FFFFFF;
        border-right:1px solid #CAD5E0;
        border-bottom:1px solid #CAD5E0;
        -moz-transform:rotate(-45deg);
        -webkit-transform:rotate(-45deg);
    }
    

    http://jsfiddle.net/4ZeCz/3/

提交回复
热议问题