Tuesday, April 21, 2009

Add Page Curl effect to HTML pages

Page Curls can be added to HTML pages using PNG images with transparent background. I have created 2 PNG images of different sizes for your convenience. You can also use the PNG images with mouse over event to show a page curl in effect when someone moves the mouse over the curl as shown in the third GIF image.

HTML Page Curl

curl_small curl_big Curl

CSS Code:
.center_container {
    width: 800px;
    margin-right: auto;
    margin-left: auto;
}
.page_content {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: small;
    background-color: #FFF;
    text-align: justify;
    padding: 20px;
}
.curl {
    background-image: url(curl_small.png);
    background-repeat: no-repeat;
    height: 100px;
    width: 100px;
    right: 0px;
    bottom: 0px;
    float: right;
}
.footer {
    background-color: #FFF;
    height: 100px;
    width: 700px;
    float: left;
}
body {
    background-image: url(bg.png); // use any background image
    background-color: #CCC;
}

HTML Code:
<div class="center_container">
<div class="page_content">Page content goes here</div>
<div class="footer"></div>
<div class="curl"></div>
</div>

Technorati Tags: ,,

No comments:

Post a Comment

Thanks a lot for your valuable comments :)