pure css arrow help

后端 未结 2 911
逝去的感伤
逝去的感伤 2021-01-15 09:39

The image below describes the issue. I am creating our comment forms. And want to create the pointer arrow in ffffff background color, and a border of 1px aaaaaa and border

2条回答
  •  不要未来只要你来
    2021-01-15 10:05

    @422; you can do with css like this rotate property.

    css
    
    #C{
        height:200px;
        width:200px;
        background:red;
        border:1px solid #000;
        position:relative;
        }
    
    .arrow{
         height: 20px;
         width: 20px;
         margin-left:30px;
        margin-top:-11px;
        background:red;
        -moz-transform:rotate(45deg);
        -webkit-transform:rotate(45deg);
        border-right:1px solid #000;
        border-bottom:1px solid #000;
        position:absolute;
        bottom:-10px;
        left:20px;
    }
    

    html

    you can use :after, :before instead of span.

    for IE you can use ie filter

    filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476); /* IE6,IE7 */
    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; /* IE8 */
    

    CHECK THIS http://jsfiddle.net/sandeep/Hec3t/7/

提交回复
热议问题