Creating a Fuzzy Border in CSS 3

后端 未结 7 1647
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 16:15

Here\'s my source image:

\"enter

And my source image zoomed in:

7条回答
  •  死守一世寂寞
    2021-02-05 16:22

    This is actually done with two CSS3 box-shadows.

    CSS:

    #fuzz
    {
        height: 100px;
        width: 100px;
        border-radius: 5px;
        border: 1px solid #333;
        box-shadow: 0px 0px 5px #333, inset 0px 0px 2px #333;
    }
    

    You can see it in action when i get back to real computer to edit the fiddle :-) (using my tablet now)

    Obviously change the colors to your taste :)

提交回复
热议问题