CSS allows text to be translucent on the image, and css text to be translucent

Source: Internet
Author: User

CSS allows text to be translucent on the image, and css text to be translucent

<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> text displayed on an image </title>
<Style type = "text/css">
* {Border: none; text-decoration: none}
. Wrap {margin: 8px; position: relative}
. Photo a {position: absolute; display: block; border: 1px solid #555555 ;}
. Photo a: hover {border: 1px solid # FFFFFF ;}
. Photo span {width: 500px; background: #000; display: block; position: absolute; bottom: 0; left: 0; color: # fff; filter: alpha (opacity = 50);-moz-opacity: 0.6; opacity: 0.6; font: bold 12px/30px Verdana, Arial; text-align: center; cursor: hand ;}
. Photo a: hover span {text-decoration: underline}
</Style>
</Head>


<Body>
<Div class = "wrap">
<Div class = "photo"> <a href = "#">
<span> the title is stacked on the image, with the title text and background translucent. Hover the mouse over the border. </Span> </a> </div>
</Div>
<Div> http://www.999jiujiu.com/</div>
</Body>

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.