1. 程式人生 > >css 實現蒙版效果

css 實現蒙版效果

樣式:

<style>
    .back {background:url(images/coupon-logo.gif) no-repeat;}
    .top {height:100px;background-color:#fff;filter:Alpha(Opacity=60);opacity:0.6;}
</style>

html

<div class="back">
    <div class="top"></div>
</div>

關鍵程式碼
background-color:#fff;filter:Alpha(Opacity=60);opacity:0.6;