鍍金池/ 問答/HTML5  HTML/ 請問下如何用css實(shí)現(xiàn)以下按鈕選中后的效果

請問下如何用css實(shí)現(xiàn)以下按鈕選中后的效果

圖片描述

也不一定得是按鈕,這本身是一個(gè)方形div

回答
編輯回答
心上人

背景圖設(shè)成這樣

2017年7月21日 20:40
編輯回答
爆扎
.wrapper{
    position: relative;
}
.wrapper::before{
    content: "\2713";
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 100;
    color: #72a9ed;
    font-size: 20px;
    height: 20px;
    line-height: 20px;
}
.wrapper::after{
    content: '';
    position: absolute;
    right: 0;
    z-index: 10;
    width: 0;
    height: 0;
    bottom: 0;
    border-right: 15px solid #fff;
    border-top: 10px solid transparent;
    border-left: 15px solid transparent;
    border-bottom: 10px solid #fff;
}
2017年9月3日 07:36