ie7+ background transparent text opaque super simple implementation method _javascript skills

Source: Internet
Author: User

If you are still worried about opaque background text, I suggest you take a look. Of course IE6 I have given up, so do not say that do not use PNG8 pictures so IE6 under the effect, of course, you can also use filters. I do not recommend using filters. Because there may be other problems! (such as unable to click and so on) to do the front of the most fear is the bug, especially IE6. Fuck off, ie6!.
The core of this article is to use PNG32 transparent pictures to do the background and then tile the background on the line. This will not have the background transparent text is also transparent. This is super simple, you know!
The picture only needs to adjust the transparency.
The transparency of setting the picture to 20% in the PSD is saved as PNG.
(Avoid: Do not set the mode to grayscale.) It's going to turn into PNG8. And there is no transparency. )
The background is transparent and the text is opaque. Ha ha. IE 6 Fuck off! Support: Ie7.0+/ff3.0+/opera10+/chrome/safari. All tests are passed.
The effect chart is as follows:

The complete code is as follows:

Copy Code code as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>ie7+ background transparent, text opaque super simple method </title>
<style>
p{margin:0;padding:0;}
. bg{width:280px;padding:5px;margin:10px 0 10px;}
. bg1{background: #000; color: #fff;}
. Bg2{background: #f60;}
. Com{background:url (Http://images/css_bg.png) repeat 0 0;border:1px solid #eee border-radius:5px;font-size:12px; padding:5px;line-height:20px;}
</style>

<body>
<div class= "bg bg1" >
<div class= "com" ><p> background transparent, text opaque. Ha ha. IE 6 fuck off! <br/> Support: <br/>ie7.0+/ff3.0+/opera10+/chrome/safari <br all tests passed. Transparency is:20%</p></div>
</div>
<div class= "bg Bg2" >
<div class= "com" ><p> background transparent, text opaque. Ha ha. IE 6 fuck off! <br/> Support: <br/>ie7.0+/ff3.0+/opera10+/chrome/safari <br all tests passed. Transparency is:20%</p></div>
</div>
</body>

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.