Reasons for using less CSS filters to achieve gradient

Source: Internet
Author: User
Recently I wrote a menu for use on the Web. Because it imitates the XP style and requires the gradient effect, I chose Microsoft's gradient filter.
Filter: progid: DXImageTransform. Microsoft. gradient (startcolorstr = # e3efff, endcolorstr = #8eb3e7, gradienttype = 1 );
However, my table is complicated: Each tr line consists of five TD items: selectable items, menu item images, an empty TD, menu text, and lower-level menu indicator triangle, therefore, the width of each column is relatively difficult to calculate. However, Microsoft's filter has a high requirement on the width accuracy, which is slightly inaccurate (the table itself will change the width based on the content ), so the gradient filter does not show the effect. I have been busy for a long time. I calculated the width of each TD, but I don't know where it is wrong. I still haven't shown it.
In the end, I gave up using the gradient filter and switched to the PS gradient image instead.
It is best to use less filters with relatively small sizes. Of course, the cause of menu failures may be related to too many menu items, because the padding of the image and text in this will affect the cell width ., if the gradient is displayed only in a single cell, this filter is easy to use.

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.