CSS Set Layer div transparency

Source: Internet
Author: User
Tags filter define end

1. Style Code

#layout {position:absolute; top:50px; width:500px; Background: #fff; Filter:alpha (opacity=70); opacity:0.7;}

1. Pop-up window appears gray transparent background, the content layer can not operate.

Define two layers:
<div style= "background:red; Filter:alpha (opacity=45); opacity:0.45; position:absolute;top:0px;left:0px; width:100%; height:100%; " ></div>
<div style= "Position:absolute;" > Content </div>

2. Define your layer with the style sheet below
. Alpha {Filter:alpha (opacity=50, finishopacity=50, style=0, startx=0, starty=0, finishx=100, finishy=100}
Explain:
Opacity= starting opacity (100 is opaque)
Finishopacity= the end of the opacity (100 of the words will not be transparent)
Style= style, starting from 0, 1.2.3 ... have even transparent ah, radiation shape transparent ah ...
Startx= begins the transparent x-coordinate, basically the picture, the upper-left corner of the layer (0)
Starty= begins the transparent y-coordinate, which is basically the picture, the upper-left corner of the layer (0)
finishx= end transparent x coordinate, basically also picture, bottom right of layer (picture, width of layer)
Finishy= ends the transparent y-coordinate, which is basically the picture, the lower-right corner of the layer (picture, height of the layer)



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.