Can you put a gradient in a table row in IE?

When I hovered over a table row in a specific part of the table, I would like the background to change to a linear gradient. CSS is simple:

tbody.row-links tr:hover { background: ...typical multi-browser linear gradient code... color: #333C3E; cursor: pointer; } 

Works great in FF, Chrome, and Safari, but not in any version of IE. I know CSS is allowed because the color and cursor are changing. I tried placing the filter in a regular <tr> and doing nothing. IE ignores filter in table rows?

The best I can think of is to apply a gradient to the <td> line when the line freezes, but it causes a fine flicker when we talk about the line.

Now I just give IE a solid background color on hover. Has anyone else tried this and figured it out?

+4
source share
1 answer

You can use something like:

 background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlNWU1ZTUiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); 

for IE9

OR

 background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); 

for IE10

older than IE with images only.

0
source

Source: https://habr.com/ru/post/1392583/


All Articles