What is the first 0 for in box-shadow?

I was just wondering if anyone could explain what the initial 0 value is in the box-shadow.

box-shadow: This is the one I am talking about -> 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);

It seems to affect the blur and spread, but it’s not the same as the blur-radius and spread-radius.

Also changing the value to any number other than 0 makes the box-shadow disappear.

I have googled around but can’t find a clear answer.

Any clues?


Your code so far

  h4 {
    text-align: center;
    background-color: rgba(45, 45, 45, 0.1);
    padding: 10px;
  p {
    text-align: justify;
  .links {
    text-align: left;
    color: black;
  .fullCard {
    width: 245px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 10px 5px;
    padding: 4px;
  .cardContent {
    padding: 10px;
  .cardText {
    margin-bottom: 30px;
<div class="fullCard">
  <div class="cardContent">
    <div class="cardText">
      <p><em>Google was founded by Larry Page and Sergey Brin while they were <u>Ph.D. students</u> at <strong>Stanford University</strong>.</em></p>
    <div class="cardLinks">
      <a href="https://en.wikipedia.org/wiki/Larry_Page" target="_blank" class="links">Larry Page</a><br><br>
      <a href="https://en.wikipedia.org/wiki/Sergey_Brin" target="_blank" class="links">Sergey Brin</a>

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.158 Safari/537.36 Vivaldi/2.5.1525.43.

That’s the shadow’s horizontal offset. Changing it should just move the shadow to the left or right.

You might have omitted the unit.

1 Like

Ok, now it makes sense.

I thought the second and third values were the position.

Now I realize that the 0 is horizontal, the second is vertical and the third is blur.

Thanks a lot for the quick answer!