Paste shadow effect

How to do this inside the shadow effect using CSS?

alt text

So far, I got this http://jsfiddle.net/yX26J/ . How to apply a shadow only to the left and up?

+3
source share
3 answers

You can change the shadow offset with:

div {
    width:80px; height:110px;
    background:#3183bd;
    -moz-box-shadow: inset 1em 1em 1em -1em #111;
    -webkit-box-shadow: inset 1em 1em 1em -1em #111;
    box-shadow: inset 1em 1em 1em -1em #111;
}

http://jsfiddle.net/ga6cy/4/

+3
source

The key is to use insertion. It is supported in all recent versions of all browsers that support box-shadow:

div.box {
  box-shadow: inset 10px 10px 10px #000000;
  -moz-box-shadow: inset 10px 10px 10px #000000;
  -webkit-box-shadow: inset 10px 10px 10px #000000;
}

This page links to browser support: https://developer.mozilla.org/en/CSS/-moz-box-shadow

0
source

.

, "" " ", .

-2

Source: https://habr.com/ru/post/1769960/


All Articles