Pure css close button

前端 未结 11 518
[愿得一人]
[愿得一人] 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 20:06

    Basic idea: For the a.boxclose:

    border-radius: 40px;
    width:20px;
    height 10px;
    background-color: #c0c0c0;
    border: 1px solid black;
    color: white;
    padding-left: 10px;
    padding-top: 4px;
    

    Adding a "X" to the content of the close box.

    http://jsfiddle.net/adzFe/1/

    Quick and dirty, but works.

提交回复
热议问题