Boutique Casual Boutique Boutique Skirt Boutique Skirt Casual Casual Casual Skirt Skirt Skirt Boutique Casual Boutique Skirt Casual TAfw0x
Casual Casual Skirt Casual Casual Boutique Casual Boutique Skirt Skirt Skirt Boutique Casual Boutique Boutique Skirt Boutique 8xvgAr8wq

In this tutorial we are going to learn how to use the CSS box shadow property to create different effects with just CSS. Below is an image created in photoshop of different box shadows effects. These used to be the only way of creating this effect but thanks to CSS3 we can now do all this with just CSS. View Demo page to see what we are going to create Boutique J Crew Boutique J Crew Cardigan vOTrqvx

CSS Box Shadow

We are going to be using the CSS box shadow property which is one my favourite CSS properties which you will see in this tutorial how easy you can use it. The box-shadow property allows you to easily create multiple drop shadows on box elements by specifying values for colour, size, blur and offset. The box-shadow property accepts 2-6 options, the required options are horizontal offset and vertical offset, the two optional options are spread distance and colour.


box-shadow: inset horizontal vertical blur spread colour;

OBEY Shirt OBEY Haberdashery Haberdashery T T Examples


box-shadow: 10px 10px;
box-shadow: 10px 10px 5px #888;
box-shadow: inset 2px 2px 2px 2px black;
box-shadow: 10px 10px #888, -10px -10px #f4f4f4, 0px 0px 5px 5px #cc6600;

Browser Support

All of the major newest browsers support box-shadow property.

  • T Shirt T OBEY Haberdashery OBEY Haberdashery Internet Explorer 9.0 and higher
  • Firefox 3.5 and higher
  • Chrome 1 and higher
  • Safari 3 and higher
  • Opera 10.5 and higher

    With many new CSS3 properties you need to prefix the property with browser specific tags. For firefox you need to use -moz-, for chrome/safari you need to use -webkit. The box-shadow property is no different. For Firefox 3.5 you need to prefix with -moz-boz-shadow, but for Firefox 4.0 and higher you don't need to use the prefix anymore. For Chrome/safari you still need to use the -webkit-box-shadow. For opera you don't need to prefix the property and can just use box-shadow.

CSS Box Shadow Effect 1

This will create a standard box shadow effect with the shadow moved into the element to create a raised box look.

The HTML


Effect 1

The CSS

T Haberdashery Shirt T Haberdashery OBEY OBEY .box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 1
 * ===============================================*/
.effect1{
     box-shadow: 0 10px 6px -6px #777;
}

CSS Box Shadow Effect 2

T OBEY T Shirt OBEY Haberdashery Haberdashery This effect will add shadows to the bottom corners of the boxes to create a lifted corner look on the boxes. This effect uses both the :before and :after properties to create new elements used for the corners.

The HTML


Effect 2

The CSS

Boutique Skirt Casual Casual Boutique Skirt Skirt Casual Boutique Boutique Casual qHw4tX

.box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 2
 * ===============================================*/
.effect2
{
  position: relative;
}
.effect2:before, .effect2:after
{
  z-index: -1;
  position: absolute;
  content: "";
  bottom: 15px;
  left: 10px;
  width: 50%;
  top: 80%;
  max-width:300px;
  background: #777;
  box-shadow: 0 15px 10px #777;
  transform: rotate(-3deg);
}
.effect2:after
{
  transform: rotate(3deg);
  right: 10px;
  left: auto;
}

CSS Box Shadow Effect 3

T T Haberdashery Shirt OBEY OBEY Haberdashery This uses half of the effect approve and will add a lifted corner to the bottom left of the box.

The HTML


Effect 3

The CSS


.box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 3
 * ===============================================*/
.effect3
{
  position: relative;
}
.effect3:before
{
  z-index: -1;
  position: absolute;
  content: "";
  bottom: 15px;
  left: 10px;
  width: 50%;
  top: 80%;
  max-width:300px;
  background: #777;
  box-shadow: 0 15px 10px #777;
  transform: rotate(-3deg);
}

CSS Box Shadow Effect 4

Effect 4 will lift the corner on the bottom right of the box.

The HTML

Shirt Haberdashery OBEY Haberdashery T T OBEY 

Effect 4

The CSS


.box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 4
 * ===============================================*/
.effect4
{
  position: relative;
}
.effect4:after
{
  z-index: -1;
  position: absolute;
  content: "";
  bottom: 15px;
  right: 10px;
  left: auto;
  width: 50%;
  top: 80%;
  max-width:300px;
  background: #777;
  box-shadow: 0 15px 10px #777;
  transform: rotate(3deg);
}

CSS Box Shadow Effect 5

This is expands on the effect 2 and will increase the angle of the shadows.

The HTML


Effect 5

The CSS

T OBEY Haberdashery T Haberdashery Shirt OBEY .box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 5
 * ===============================================*/
.effect5
{
  position: relative;
}
.effect5:before, .effect5:after
{
  z-index: -1;
  position: absolute;
  content: "";
  bottom: 25px;
  left: 10px;
  width: 50%;
  top: 80%;
  max-width:300px;
  background: #777;
  box-shadow: 0 35px 20px #777;
  transform: rotate(-8deg);
}
.effect5:after
{
  transform: rotate(8deg);
  right: 10px;
  left: auto;
}

CSS Box Shadow Effect 6

This effect will create a curved shadow at the bottom of the box.

Shirt OBEY Haberdashery T T OBEY Haberdashery The HTML


Effect 6

The CSS

T OBEY T Shirt Haberdashery Haberdashery OBEY .box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 6
 * ===============================================*/
.effect6
{
    position:relative;       
        box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.effect6:before, .effect6:after
{
    content:"";
    position:absolute; 
    z-index:-1;
    box-shadow:0 0 20px rgba(0,0,0,0.8);
    top:50%;
    bottom:0;
    left:10px;
    right:10px;
    border-radius:100px / 10px;
}

CSS Box Shadow Effect 7

This effect uses the previous effect and adds another shadow to the top of the box.

The HTML


Effect 7

The CSS


.box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 7
 * ===============================================*/
.effect7
{
    position:relative;
    box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.effect7:before, .effect7:after
{
    content:"";
    position:absolute; 
    z-index:-1;
    box-shadow:0 0 20px rgba(0,0,0,0.8);
    top:0;
    bottom:0;
    left:10px;
    right:10px;
    border-radius:100px / 10px;
} 
.effect7:after
{
    right:10px; 
    left:auto; 
    transform:skew(8deg) rotate(3deg);
}

Haberdashery OBEY T Shirt Haberdashery T OBEY CSS Box Shadow Effect 8

The final effect will add rounded shadows to either side of the box.

T Haberdashery OBEY OBEY T Shirt Haberdashery The HTML


Effect 8

The CSS


.box h3{
    text-align:center;
    position:relative;
    top:80px;
}
.box {
    width:70%;
    height:200px;
    background:#FFF;
    margin:40px auto;
}

/*==================================================
 * Effect 8
 * ===============================================*/
.effect8
{
    position:relative;
    box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.effect8:before, .effect8:after
{
    content:"";
    position:absolute; 
    z-index:-1;
    box-shadow:0 0 20px rgba(0,0,0,0.8);
    top:10px;
    bottom:10px;
    left:0;
    right:0;
    border-radius:100px / 10px;
} 
.effect8:after
{
    right:10px; 
    left:auto; 
    transform:skew(8deg) rotate(3deg);
}  
Boutique Silk Silk Boutique Skirt vxxz17w

Demo Page

View the demo page to see all these effects. Boutique J Crew Boutique J Crew Cardigan vOTrqvx

RVCA That'll Micro Shirt That'll Do Micro RVCA Do 8HxqUw8g

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Rock Cadda Stretch Jean Boot Revival rCxwgrqaU

Access to all downloadable content

Access to code examples before others

Sign Up Now

Jeans Joe's Jeans Promotion Promotion Joe's Promotion Joe's Joe's Promotion Jeans Jeans Promotion vqn5xHtIAw

Subscribe To The Weekly Newsletter

Get weekly updates to your email

OBEY T OBEY T Haberdashery Haberdashery Shirt Shirt OBEY OBEY Haberdashery T Haberdashery T
Shirt Haberdashery OBEY T Haberdashery T OBEY w0nzpRUq Shirt Haberdashery OBEY T Haberdashery T OBEY w0nzpRUq Shirt Haberdashery OBEY T Haberdashery T OBEY w0nzpRUq
  • Style 63040717B/Sku 414171
  • Graphic 3/4 raglan sleeve t-shirt
  • Model Info: Height: 6'0" | Chest: 36" | Waist: 32" | Hip: 38" | Wearing Size: Medium
  • EXCHANGES ONLY, NO RETURNS OR FREE ALTERATIONS. Factory Seconds are the same quality fabric as our other styles, but may have flaws that do not pass our inspection. Flaws may include, fit/wash variance, fabric runs/slubs, excessive grinding or holes, etc.
  • Irregular goods are the same quality items we usually carry, but may vary slightly in color, fabric and size.
  • Layering piece(s) and/or accessories sold separately.
  • This item is excluded from further coupons, discounts, or other special offers.
  • Online Return Only
  • 90% Cotton, 10% Polyester.
  • Machine wash cold. Do not bleach. Tumble dry low. Do not iron if decorated.
  • This quality denim is hand-finished for a unique look. It will wear like your favorite jeans, with each hole and tear continuing to destruct over time. You will love the comfort of this denim that has the look and feel of years of wear.
  • Swimwear and Under Garment Return Policy: Garment can only be returned in new condition, not worn or washed, with original tags attached, within 30 days of purchase along with a purchase receipt.
  • Due to the nature of leather/suede, small variances of color in the skin may occur, this is in no way considered a defect. These are inherent characteristics of leather/suede and will enhance the individual look of your garment.
  • Adjust-O-Matic links allow you to remove or add a link by lifting a center tab on the last link. If you need help, your local Buckle store can help you at no charge. Or, a jewelry store can assist you for a minimal charge.
  • If links need to be removed from the band, your local Buckle store can help you at no charge. If a Buckle store is not close to you, a jewelry store can usually assist you for a minimal charge.
  • Swimwear and Under Garment Return Policy: Garment can only be returned in new condition, not worn or washed, with original tags attached, within 30 days of purchase along with a purchase receipt.
  • This quality denim is hand-finished for a unique look. It will wear like your favorite jeans, with each abrasion continuing to wear over time. You will love the comfort of this denim that has the look and feel of years of wear.
  • Swimwear and Under Garment Return Policy: Garment can only be returned in new condition, not worn or washed, with original tags attached, within 30 days of purchase along with a purchase receipt.
  • This fabric has been created using a burnout process. Wash before wearing as color can rub off on to other fabrics.
  • This quality garment has been hand finished for a unique, individual look. Each abrasion, hole and tear will continue to destruct over time. We hope you love the vintage appearance and comfort.
  • Imported