Before we all had cameras in our phones, people could take a Polaroid® photo which would print directly from the camera, and had a unique, framed look.
This framed look can be used to show photos in an interesting way on certain sites, such as a vacation sites, zoo sites, or photo-oriented sites just to name a few.
HTML
CSS
figure.polaroid {
background-color: white;
border: #ffffff solid 10px;
border-top-width: 14px;
box-shadow: 4px 4px 8px 2px rgba(0, 0, 0, 0.2);
transform: rotate(1deg);
}
figure.polaroid img {
width: 100%;
}
figcaption.polaroid_title {
text-align: center;
padding: 25px 20px 1%;
}
Notice that we slightly rotate the image to give it that “tossed in place” look. If you have multiple photos spread out down a page of text, you may want to put a different rotate angle on each so they don’t look so uniformly placed.
Example
We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.
Why 1SMARTchicken?
See More →
Thanks for your support!
CSS Books
All are affiliate links. Thank you for your support!
CSS NOTES:
- The “inherit”, “initial” and “unset” keywords can be used with any CSS property to set its value
- In CSS there are many ways to express a color value in a property
Feedback
If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.