<article>
<div id="handmaid" class="book">
<div class="gloss"></div>
<img class="cover" src="img/cover.webp" alt="A cover for the book The Handmaid's Tale. The cover depicts a disembodied handmaid." />
<div class="description">
<div class="title">The Handmaid's Tale</div>
<hr>
<p>
In the Republic of Gilead, formerly the United States, far-right
Schlafly/Falwell-type ideals have been carried to extremes in the
monotheocratic government. The resulting society is a feminist's
nightmare: women are strictly controlled, unable to have jobs or money
and assigned to various classes: the chaste, childless Wives; the
housekeeping Marthas; and the reproductive Handmaids, who turn their
offspring over to the "morally fit" Wives. The tale is told by Offred
(read: "of Fred"), a Handmaid who recalls the past and tells how the
chilling society came to be.
</p>
<blockquote>
“A novel that brilliantly illuminates some of the darker
interconnections between politics and sex...just as the world of
Orwell’s 1984 gripped our imaginations, so will the world of Atwood’s
handmaid!” <br /><i>Washington Post Book World</i>
</blockquote>
</div>
</div>
<h2>The Handmaid's Tale</h2>
<div class="rating">
<span>☆</span><span>☆</span><span>☆</span><span>☆</span><span>☆</span>
</div>
</article>
@font-face {
font-family: "Pontano Sans";
src: url("./PontanoSans-VariableFont_wght.ttf");
}
:root {
--perspective: 1000px;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
display: grid;
place-items: center;
height: 100dvh;
margin: 0;
font-family: "Pontano Sans", sans-serif;
font-size: calc(0.65em + 0.05vw);
}
h2 {
font-size: 1.75em;
font-weight: 600;
text-align: center;
letter-spacing: 0.1em;
}
.book {
display: block;
position: relative;
width: 320px;
height: 453px;
}
.gloss {
position: absolute;
top: 0;
z-index: 200;
width: 20%;
height: 100%;
overflow: hidden;
opacity: 0.5;
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0),
rgba(255, 255, 255, 0.2),
rgba(255, 255, 255, 0)
);
transition: all 0.5s;
transform: translateX(-50%) rotateY(0deg);
transform-origin: left center;
}
.cover {
position: absolute;
width: 100%;
z-index: 100;
transition: transform 0.5s;
transform: translateX(0);
transform-origin: left center;
backface-visibility: hidden;
}
.description {
position: absolute;
left: 0;
top: 0;
width: inherit;
height: inherit;
padding: 10%;
padding-block-start: 5%;
border: solid 1px grey;
background: white;
transition: all 1s;
z-index: 1;
}
.title {
font-family: "Pontano Sans", sans-serif;
font-size: 0.85em;
text-align: center;
margin: 0 auto;
width: fit-content;
line-height: 1.25em;
}
.book:hover {
cursor: pointer;
}
.book:hover .cover {
transform: perspective(var(--perspective)) rotateY(-80deg);
}
.book:hover .gloss {
transform: perspective(var(--perspective)) rotateY(-80deg) translateX(100%)
scaleX(5);
}
.book:hover .description {
transform: translateX(20%);
}
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
height: 2em;
margin: 0 auto;
color: grey;
}
.rating > span {
display: inline-block;
position: relative;
font-size: 1.75em;
margin-right: 0.2em;
}
.rating > span ~ span:before {
content: "\2605";
position: absolute;
color: #8d2a06;
}
A three-dimensional hover effect to open a book and reveal a synopsis of the story. I wanted to try to create a realistic reflection on the cover. You can see the light “reflect” off the cover as it opens.