Creating a Fuzzy Border in CSS 3

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

Here\'s my source image:

\"enter

And my source image zoomed in:

7条回答
  •  离开以前
    2021-02-05 16:26

    You can probably just get away with setting the border to a light colour and outline to a darker colour, then just set the border-radius. Note I haven't tested this, and if memory serves the outline does not curve with border-radius. Also note that border-radius requires several attributes to be set to become cross-browser compatible. Refer to http://perishablepress.com/press/2008/11/24/perfect-rounded-corners-with-css/ for more info.

    If this fails, you could always use an inner-div, which you set to position absolute, left 0, right 0, top 0 and bottom 0 and then use that as either the inner or outer border. Setting the border-radius will definitely work then.

    Regards, Richard

提交回复
热议问题