CSS Implementation table background Two-color gradient _css/html

Source: Internet
Author: User
The principle is to use the Alpha filter to add a transparent gradient to each table, which is controlled by the background color of the table, and a single TD controls the other gradient
Alpha Filter
Syntax: {filter:alpha (opacity=opacity,finishopacity=finishopacity,style=style,startx=startx,starty=starty,finishx= Finishx,finishy=finishy)}
Filter:alpha (opacity=100, finishopacity=0, style=1, startx=0, starty=0, finishx=0, finishy=100);

The ' Alpha ' attribute is a blend of a target element with the background. Designers can specify values to control the degree of blending. This "mixed with background" is popularly said to be the transparency of an element. By specifying coordinates, you can refer to the transparency of the point, line, and polygon. Their parameters have the following meanings:
"Opacity" represents the level of transparency. The default range is from 0 to 100, and they are actually in percent form. In other words, 0 is completely transparent and 100 is completely opaque. "Finishopacity" is an optional parameter that you can use to specify the transparency at the end if you want to set the transparency effect of the gradient. The range is also 0 to 100. The "style" parameter specifies the shape characteristics of the transparent area. 0 of them represent a uniform shape, 1 are linear, 2 are radial, and 3 represent rectangles. "STARTX" and "Starty" represent the start x and y coordinates of the gradient transparency effect. "Finishx" and "finishy" represent the coordinates of the gradient transparency effect ending with x and Y.

<body bgcolor= "#EEEEEE" > <style type= "text/css" > <!--. XR td {Font-family: "Tahoma"; font-size:12px; font -weight:bold; Text-align:center; Filter:alpha (opacity=100, finishopacity=0, style=1, startx=0, starty=0, finishx=0, finishy=100); } table {font-family: "Tahoma"; font-size:12px;}-</style> <table width= "80%" border= "0" cellpadding= "5" cellspacing= "1" bgcolor= "#003399" > <tr bgcolor= "#FFFFFF" class= "XR" > <td width= "" "Bgcolor=" #00FFFF "> id</td> <td bgcolor= "#99FF00" >Name</td> <td bgcolor= "#FF0000" >ICQ</td> <td bgcolor= "#FFCC00" >MSN</td> <td bgcolor= "#66CC00" >Homepage</td> <td bgcolor= "#003366" >date</ td> <td bgcolor= "#CC3300" >Content</td> </tr> <tr align= "center" bgcolor= "#FFFFFF" > <td > </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> & lt;/td> <td> </td> </tr> </table>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
  • 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.