How to make shadow on border-bottom?

前端 未结 6 1921
不知归路
不知归路 2020-12-28 11:56

I need to apply the border shadow on border-bottom by CSS3. I just want to apply CSS3 shadow on bottom. Is this possible?

6条回答
  •  情歌与酒
    2020-12-28 12:40

    funny, that in the most answer you create a box with the text (or object), instead of it create the text (or object) div and under that a box with 100% width (or at least what it should) and with height what equal with your "border" px... So, i think this is the most simple and perfect answer:

    Your Text

    and the css:

        .shadow {
            width:100%;
            height:1px; // = "border height (without the shadow)!"
            background:#000; // = "border color!"
            -webkit-box-shadow: 0px 1px 8px 1px rgba(0,0,0,1); // rbg = "border shadow color!"
            -moz-box-shadow: 0px 1px 8px 1px rgba(0,0,0,1); // rbg = "border shadow color!"
            box-shadow: 0px 1px 8px 1px rgba(0,0,0,1); // rbg = "border shadow color!"
    

    }

    Here you can experiment with the radius, etc. easy: https://www.cssmatic.com/box-shadow

提交回复
热议问题