0

How to create pages similar to a book shadows, using two divs and CSS3? Equal in the image that follows attachment.

I tried using box-shadow with inset but it worked.

box-shadow: inset -5px -5px 5px #888;

Thank you.

Shadow page

asked Jan 28, 2014 at 13:51
1
  • « I tried using box-shadow with inset but it worked. » — I suppose you mean but it didn't work — but what were the results? Commented Jan 28, 2014 at 14:19

2 Answers 2

1

You can use linear gradient:

.leftPage{
 background: linear-gradient(to right, #fff 92%, #9f9f9f 100%);
}
.rightPage{
 background: linear-gradient(to left, #fff 95%, #898989 100%);
}

example -> jsfiddle

answered Jan 29, 2014 at 12:20
Sign up to request clarification or add additional context in comments.

Comments

0

Here you go http://jsfiddle.net/DhgY8/1/

HTML

<div class="book">
 <div class="left page"></div>
 <div class="right page"></div>
</div>

CSS

.book {
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: silver;
}
.left {
 box-shadow: 6px 0 2px 1px black, -8px 0 6px grey inset;
 z-index: 3;
 left: 0;
}
.right {
 right: 0;
}
.page {
 background: white;
 position: absolute;
 top: 0;
 bottom: 0;
 width: 50%;
}

It's not perfect, but it's pretty close to what you want :)

answered Jan 28, 2014 at 14:01

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.