Double box/border? Is this possible in CSS?

前端 未结 4 1344
时光取名叫无心
时光取名叫无心 2021-01-17 17:20

I\'m trying to recreate this image in CSS.

This is what I got from experimenting, so far. I used box-shadow to act as the second box. I\'m not sure if there\'s a bet

4条回答
  •  一个人的身影
    2021-01-17 17:55

    Try this example

    Hope it will help you.

    .border {
    text-align: center;
    border: solid 3px black;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    color: black;
    letter-spacing: 2px;
    padding: 20px 15px;
    margin: 15px 15px;
    background: white;
    -webkit-box-shadow: 3px 3px 0px 0px #ffffff, 3px 3px 0px 3px #000000;
    -moz-box-shadow: 3px 3px 0px 0px #ffffff, 3px 3px 0px 3px #000000;
    box-shadow: 3px 3px 0px 0px #ffffff, 3px 3px 0px 3px #000000;
    }
    Title

    EDIT

    Here now you can see that i made box-shadow to 3px and no longer right side corner.

提交回复
热议问题