Pure css close button

前端 未结 11 526
[愿得一人]
[愿得一人] 2020-12-12 19:51

JSFiddle

Is there any way to make something like the X on that link with pure css?

\"enter

11条回答
  •  没有蜡笔的小新
    2020-12-12 19:58

    I spent more time on this than I should have, and haven't tested in IE for obvious reasons. That being said, it's pretty much identical.

    http://jsfiddle.net/adzFe/14/

    a.boxclose{
        float:right;
        margin-top:-30px;
        margin-right:-30px;
        cursor:pointer;
        color: #fff;
        border: 1px solid #AEAEAE;
        border-radius: 30px;
        background: #605F61;
        font-size: 31px;
        font-weight: bold;
        display: inline-block;
        line-height: 0px;
        padding: 11px 3px;       
    }
    
    .boxclose:before {
        content: "×";
    }
    

提交回复
热议问题