How to make a rounded drop shadow on a png image











up vote
2
down vote

favorite












I am trying to recreate a website template I found on Behance. While I found a great solution and learned something new with filter: dropshadow(); I would really like to just make the drop-shadow on my png rounded. I tried border-radius changes but to no attest maybe blur() but that blurs the image, and I hoped you could do something like drop-shadow(blur()); which would be cheeky.



Here is the codepen an image for clarity below and the code. Thanks.



enter image description here



.weapon-1{

background: url(../pictor/pistols/360fx360f.png) center center no-repeat;
background-size: contain;
width: 100px;
height: 100px;
-moz-filter: drop-shadow(0 0 10px #B3135D);
-webkit-filter: drop-shadow(0 0 10px #B3135D);
filter: drop-shadow(0 0 10px #B3135D);

}









share|improve this question









New contributor




Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    up vote
    2
    down vote

    favorite












    I am trying to recreate a website template I found on Behance. While I found a great solution and learned something new with filter: dropshadow(); I would really like to just make the drop-shadow on my png rounded. I tried border-radius changes but to no attest maybe blur() but that blurs the image, and I hoped you could do something like drop-shadow(blur()); which would be cheeky.



    Here is the codepen an image for clarity below and the code. Thanks.



    enter image description here



    .weapon-1{

    background: url(../pictor/pistols/360fx360f.png) center center no-repeat;
    background-size: contain;
    width: 100px;
    height: 100px;
    -moz-filter: drop-shadow(0 0 10px #B3135D);
    -webkit-filter: drop-shadow(0 0 10px #B3135D);
    filter: drop-shadow(0 0 10px #B3135D);

    }









    share|improve this question









    New contributor




    Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I am trying to recreate a website template I found on Behance. While I found a great solution and learned something new with filter: dropshadow(); I would really like to just make the drop-shadow on my png rounded. I tried border-radius changes but to no attest maybe blur() but that blurs the image, and I hoped you could do something like drop-shadow(blur()); which would be cheeky.



      Here is the codepen an image for clarity below and the code. Thanks.



      enter image description here



      .weapon-1{

      background: url(../pictor/pistols/360fx360f.png) center center no-repeat;
      background-size: contain;
      width: 100px;
      height: 100px;
      -moz-filter: drop-shadow(0 0 10px #B3135D);
      -webkit-filter: drop-shadow(0 0 10px #B3135D);
      filter: drop-shadow(0 0 10px #B3135D);

      }









      share|improve this question









      New contributor




      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I am trying to recreate a website template I found on Behance. While I found a great solution and learned something new with filter: dropshadow(); I would really like to just make the drop-shadow on my png rounded. I tried border-radius changes but to no attest maybe blur() but that blurs the image, and I hoped you could do something like drop-shadow(blur()); which would be cheeky.



      Here is the codepen an image for clarity below and the code. Thanks.



      enter image description here



      .weapon-1{

      background: url(../pictor/pistols/360fx360f.png) center center no-repeat;
      background-size: contain;
      width: 100px;
      height: 100px;
      -moz-filter: drop-shadow(0 0 10px #B3135D);
      -webkit-filter: drop-shadow(0 0 10px #B3135D);
      filter: drop-shadow(0 0 10px #B3135D);

      }






      css filter dropshadow






      share|improve this question









      New contributor




      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Nov 10 at 13:02





















      New contributor




      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Nov 10 at 12:50









      Stegnat Sum

      354




      354




      New contributor




      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          for rounded drop shadow you can use radial-gradient in background with transparent image.



          original image used in snippet is original image
          Please refer snippet.






          body{background-color: black}
          img {

          /* For browsers that do not support gradients */
          background-image: radial-gradient(circle, white, black, black);
          padding: 50px;
          }

          <body>

          <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
          </body>








          share|improve this answer























          • Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
            – Stegnat Sum
            Nov 10 at 19:01










          • @StegnatSum ok...then please accept this answer. To help others in finding this as solution
            – WC2
            2 days ago


















          up vote
          0
          down vote













          You can also combine elements for a really unique effect especially with compound colors. Here I am using a blue and a purple.






          .weapon-1{
          background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
          background-size: contain;
          width: 200px;
          height: 200px;
          -moz-filter: drop-shadow(0 0 10px #2C18AF);
          -webkit-filter: drop-shadow(0 0 10px #2C18AF);
          filter: drop-shadow(0 0 10px #2C18AF);
          }

          <div class="weapon weapon-1 mx-2"></div>








          share|improve this answer








          New contributor




          Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.


















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            Stegnat Sum is a new contributor. Be nice, and check out our Code of Conduct.










             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239119%2fhow-to-make-a-rounded-drop-shadow-on-a-png-image%23new-answer', 'question_page');
            }
            );

            Post as a guest
































            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            for rounded drop shadow you can use radial-gradient in background with transparent image.



            original image used in snippet is original image
            Please refer snippet.






            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>








            share|improve this answer























            • Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
              – Stegnat Sum
              Nov 10 at 19:01










            • @StegnatSum ok...then please accept this answer. To help others in finding this as solution
              – WC2
              2 days ago















            up vote
            1
            down vote



            accepted










            for rounded drop shadow you can use radial-gradient in background with transparent image.



            original image used in snippet is original image
            Please refer snippet.






            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>








            share|improve this answer























            • Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
              – Stegnat Sum
              Nov 10 at 19:01










            • @StegnatSum ok...then please accept this answer. To help others in finding this as solution
              – WC2
              2 days ago













            up vote
            1
            down vote



            accepted







            up vote
            1
            down vote



            accepted






            for rounded drop shadow you can use radial-gradient in background with transparent image.



            original image used in snippet is original image
            Please refer snippet.






            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>








            share|improve this answer














            for rounded drop shadow you can use radial-gradient in background with transparent image.



            original image used in snippet is original image
            Please refer snippet.






            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>








            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>





            body{background-color: black}
            img {

            /* For browsers that do not support gradients */
            background-image: radial-gradient(circle, white, black, black);
            padding: 50px;
            }

            <body>

            <img src="https://vignette.wikia.nocookie.net/fantendo/images/a/ae/250px-Captain_Falcon_SSB4.png" />
            </body>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 10 at 15:35

























            answered Nov 10 at 14:47









            WC2

            1007




            1007












            • Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
              – Stegnat Sum
              Nov 10 at 19:01










            • @StegnatSum ok...then please accept this answer. To help others in finding this as solution
              – WC2
              2 days ago


















            • Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
              – Stegnat Sum
              Nov 10 at 19:01










            • @StegnatSum ok...then please accept this answer. To help others in finding this as solution
              – WC2
              2 days ago
















            Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
            – Stegnat Sum
            Nov 10 at 19:01




            Legit, I straight glanced over radial gradient. Still this question could help someone else as well. Thanks!
            – Stegnat Sum
            Nov 10 at 19:01












            @StegnatSum ok...then please accept this answer. To help others in finding this as solution
            – WC2
            2 days ago




            @StegnatSum ok...then please accept this answer. To help others in finding this as solution
            – WC2
            2 days ago












            up vote
            0
            down vote













            You can also combine elements for a really unique effect especially with compound colors. Here I am using a blue and a purple.






            .weapon-1{
            background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
            background-size: contain;
            width: 200px;
            height: 200px;
            -moz-filter: drop-shadow(0 0 10px #2C18AF);
            -webkit-filter: drop-shadow(0 0 10px #2C18AF);
            filter: drop-shadow(0 0 10px #2C18AF);
            }

            <div class="weapon weapon-1 mx-2"></div>








            share|improve this answer








            New contributor




            Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.






















              up vote
              0
              down vote













              You can also combine elements for a really unique effect especially with compound colors. Here I am using a blue and a purple.






              .weapon-1{
              background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
              background-size: contain;
              width: 200px;
              height: 200px;
              -moz-filter: drop-shadow(0 0 10px #2C18AF);
              -webkit-filter: drop-shadow(0 0 10px #2C18AF);
              filter: drop-shadow(0 0 10px #2C18AF);
              }

              <div class="weapon weapon-1 mx-2"></div>








              share|improve this answer








              New contributor




              Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.




















                up vote
                0
                down vote










                up vote
                0
                down vote









                You can also combine elements for a really unique effect especially with compound colors. Here I am using a blue and a purple.






                .weapon-1{
                background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
                background-size: contain;
                width: 200px;
                height: 200px;
                -moz-filter: drop-shadow(0 0 10px #2C18AF);
                -webkit-filter: drop-shadow(0 0 10px #2C18AF);
                filter: drop-shadow(0 0 10px #2C18AF);
                }

                <div class="weapon weapon-1 mx-2"></div>








                share|improve this answer








                New contributor




                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                You can also combine elements for a really unique effect especially with compound colors. Here I am using a blue and a purple.






                .weapon-1{
                background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
                background-size: contain;
                width: 200px;
                height: 200px;
                -moz-filter: drop-shadow(0 0 10px #2C18AF);
                -webkit-filter: drop-shadow(0 0 10px #2C18AF);
                filter: drop-shadow(0 0 10px #2C18AF);
                }

                <div class="weapon weapon-1 mx-2"></div>








                .weapon-1{
                background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
                background-size: contain;
                width: 200px;
                height: 200px;
                -moz-filter: drop-shadow(0 0 10px #2C18AF);
                -webkit-filter: drop-shadow(0 0 10px #2C18AF);
                filter: drop-shadow(0 0 10px #2C18AF);
                }

                <div class="weapon weapon-1 mx-2"></div>





                .weapon-1{
                background: url(https://steamcdn-a.akamaihd.net/apps/730/icons/econ/default_generated/weapon_hkp2000_aq_p2000_boom_light_large.39f01b0b86b795bea56300432fecfbf93415ee58.png) center center no-repeat, radial-gradient(ellipse at center, #9C08E2 -100%, transparent 40%);
                background-size: contain;
                width: 200px;
                height: 200px;
                -moz-filter: drop-shadow(0 0 10px #2C18AF);
                -webkit-filter: drop-shadow(0 0 10px #2C18AF);
                filter: drop-shadow(0 0 10px #2C18AF);
                }

                <div class="weapon weapon-1 mx-2"></div>






                share|improve this answer








                New contributor




                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered Nov 10 at 20:17









                Stegnat Sum

                354




                354




                New contributor




                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Stegnat Sum is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






















                    Stegnat Sum is a new contributor. Be nice, and check out our Code of Conduct.










                     

                    draft saved


                    draft discarded


















                    Stegnat Sum is a new contributor. Be nice, and check out our Code of Conduct.













                    Stegnat Sum is a new contributor. Be nice, and check out our Code of Conduct.












                    Stegnat Sum is a new contributor. Be nice, and check out our Code of Conduct.















                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239119%2fhow-to-make-a-rounded-drop-shadow-on-a-png-image%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest




















































































                    Popular posts from this blog

                    Florida Star v. B. J. F.

                    Error while running script in elastic search , gateway timeout

                    Adding quotations to stringified JSON object values