{"id":3039,"date":"2017-02-20T18:03:38","date_gmt":"2017-02-21T00:03:38","guid":{"rendered":"http:\/\/cssnewbie.com\/?p=2108"},"modified":"2017-02-20T18:03:38","modified_gmt":"2017-02-21T00:03:38","slug":"6-cool-ways-to-use-shadows-in-css","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/6-cool-ways-to-use-shadows-in-css\/","title":{"rendered":"6 Cool Ways to Use Shadows in CSS"},"content":{"rendered":"<p>CSS&#8217;s box-shadow and text-shadow properties are incredibly versatile, allowing you not just to add shadows to various elements and text, but also making it possible to create cool, multi-dimensional effects for your projects. If you&#8217;re looking for inspiration on new ways to use shadows in your sites, check out this list of some of the most professional, smooth, and innovative ways that box and text shadows can be easily implemented in any projects.<\/p>\n<p>1. <a href=\"http:\/\/codepen.io\/MishaHahaha\/pen\/akXmkq\" target=\"_blank\" rel=\"noopener noreferrer\">Diffused Shadow<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/MishaHahaha\/pen\/akXmkq\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2124 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-10.43.32-AM-1024x276.png\" alt=\"Screen Shot 2017-02-21 at 10.43.32 AM\" width=\"575\" height=\"155\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This tutorial demonstrates how to apply\u00a0a subtle, soft box shadow to your block level elements. The shadow in this tutorial is &#8220;diffused,&#8221; so the effect is a lot more realistic than your standard box-shadow code.<\/p>\n<p>2. <a href=\"http:\/\/codepen.io\/ashleynolan\/pen\/QwvKaw\" target=\"_blank\" rel=\"noopener noreferrer\">Text-Shadow Hover Effects<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/ashleynolan\/pen\/QwvKaw\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2125 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-10.46.06-AM.png\" alt=\"Screen Shot 2017-02-21 at 10.46.06 AM\" width=\"517\" height=\"144\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>One of the coolest things about the text-shadow property is that it can be used to create unique 3D\u00a0text effects. This snippet shows you how to use text-shadow to create a smooth shadow effect with an animated transition upon hover.<\/p>\n<p>3. <a href=\"http:\/\/codepen.io\/lbebber\/pen\/BzoHi\" target=\"_blank\" rel=\"noopener noreferrer\">Dashed Shadow<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/lbebber\/pen\/BzoHi\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2126 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-10.56.31-AM.png\" alt=\"Screen Shot 2017-02-21 at 10.56.31 AM\" width=\"492\" height=\"215\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Not your average text-shadow effect &#8212; this snippet shows you how to create a text shadow that is dashed, rather than solid. Definitely a cool way to shake up the basic and expected solid text-shadow and add a little fun to your projects.<\/p>\n<p>4. <a href=\"http:\/\/codepen.io\/maxakohler\/pen\/mAxHz\" target=\"_blank\" rel=\"noopener noreferrer\">Long Shadow Designs<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/maxakohler\/pen\/mAxHz\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2127 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-11.01.02-AM-1024x321.png\" alt=\"Screen Shot 2017-02-21 at 11.01.02 AM\" width=\"549\" height=\"172\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>According to the author of this tutorial, flat design is a thing of the past. If you&#8217;re on board with the new 3D design trend, then you&#8217;ll probably love this take on shadows. This snippet shows you how to create icons, buttons, and text with long, exaggerated shadows to add a cool 3D effect to your projects.<\/p>\n<p>5. <a href=\"http:\/\/codepen.io\/maxakohler\/pen\/mAxHz\" target=\"_blank\" rel=\"noopener noreferrer\">Long Shadow Text<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/maxakohler\/pen\/mAxHz\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2128 aligncenter\" src=\"http:\/\/cssnewbie.com\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-11.03.27-AM-1024x245.png\" alt=\"Screen Shot 2017-02-21 at 11.03.27 AM\" width=\"639\" height=\"153\" \/><\/a><\/p>\n<p>Another take on long text-shadows, the shadows in this snippet are more diffused with a longer fade than the shadows in the tutorial above.<\/p>\n<p>6. \u00a0<a href=\"http:\/\/codepen.io\/joshbader\/pen\/GrHoC\" target=\"_blank\" rel=\"noopener noreferrer\">Parallax Shadow<\/a><\/p>\n<p><a href=\"http:\/\/codepen.io\/joshbader\/pen\/GrHoC\"><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-2129 aligncenter\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/02\/Screen-Shot-2017-02-21-at-11.08.40-AM.png\" alt=\"Screen Shot 2017-02-21 at 11.08.40 AM\" width=\"552\" height=\"276\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>One of the more innovative tutorials on this list, the shadow in this snippet moves in conjunction with the scroll. So if the user scrolls down, the shadow effect on the text appears below the text. If the user scrolls back up, the shadow effect appears to move above the text. A pretty neat effect to add to any of your projects!<\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>CSS&#8217;s box-shadow and text-shadow properties are incredibly versatile, allowing you not just to add shadows to various elements and text, but also making it possible to create cool, multi-dimensional effects for your projects. If you&#8217;re looking for inspiration on new [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/6-cool-ways-to-use-shadows-in-css\/\" title=\"Click to read '6 Cool Ways to Use Shadows in CSS'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":2825,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[174,1],"tags":[],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/3039"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=3039"}],"version-history":[{"count":0,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/3039\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media\/2825"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=3039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=3039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=3039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}