スタイルシートで画像を仮装

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

TORRANCE WEB DESIGNのエントリーから、画像に枠線やウォーターマーク、キャプションをつけるスタイルシートをご紹介

Framed Image Effect

HTML

    <div class="frame-block">
    <span> </span>
    <img src="sample.jpg" alt="" />
    </div>

CSS

    .frame-block {
    position: relative;
    display: block;
    height:333px;
    width: 555px;
    }
    .frame-block span {
    background: url(sample.png) no-repeat center top;
    height:333px;
    width: 555px;
    display: block;
    position: absolute;
    }

 

Watermark Effect
HTML

    <div class="transp-block">
    <img class="transparent" src="sample.jpg" alt="" />
    </div>

CSS

    .transp-block {
    background: #000 url(sample.jpg) no-repeat;
    width: 555px;
    height: 333px;
    }
    img.transparent {
    -moz-opacity:.75;
    filter:alpha(opacity=75);
    opacity:.75;
    }

 

Image with Caption
HTML

    <div class="img-desc">
    <img src="sample.jpg" alt="" />
    <cite>Text Text Text Text Text </cite>
    </div>

CSS

    .img-desc {
    position: relative;
    display: block;
    height:333px;
    width: 555px;
    }
    .img-desc cite {
    background: #111;
    -moz-opacity:.55;
    filter:alpha(opacity=55);
    opacity:.55;
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 555px;
    padding: 10px;
    border-top: 1px solid #999;
    }

 

5 Ways to Spice up Your Images with CSS
 http://www.sohtanaka.com/web-design/spice-up-your-images-with-css/

508 views

Pilipinas Top Site: Please, Click on the Banner!

»» WORLDLIVE 海外在住者人気ブログ    »» にほんブログ村 海外生活ブログ フィリピン情報    »» 人気ブログランキング    »» フィリピン系ホームページランキング!

Relevant Books: スタイルシートで画像を仮装

-->