Less use of CSS filters to achieve gradient reasons

xiaoxiao2021-03-06  83

Recently write a menu on the web, because imitating the XP style, you need to use the gradient effect, you want to choose Microsoft's gradular filter.

As follows: Filter: Progid: DxImageTransform.microsoft.gradient (StartColorstr = # E3EFFF, EndColorstr = # 8eb3e7, gradienttype = 1);

But because my form is more complicated: each line TR consists of 5 TDs: optional items, menu items, an empty TD, menu text, the lower menu indication triangle, so relatively, the width of each column is more difficult to calculate However, Microsoft's filter has a relatively high accuracy of the width, slightly inaccurate (the form you will change the width according to the content), so the gradient filter does not show up the effect. Busy for a long time, I will pay each TD The width is calculated, but I don't know where it is wrong, still there is no display.

In the end, it is still giving up the gradient filter to replace the gradient image made by PS.

For dimensions, it is best to use, of course, the cause of failure on the menu may have too much relationship with the menu item, because the pictures and text padding affect the width of the cell., If Just single-handed display gradient, this filter is still better.

转载请注明原文地址:https://www.9cbs.com/read-94743.html

New Post(0)