Convert CSS to Image

Yusuf 791 Reputation points
2021-09-03T14:30:35.063+00:00

Hi
I am using htmlrenderer.WinForms to save CSS as Image

Convert CSS to image in C#

CSS code

     .bg{

background-image: linear-gradient(90deg, rgb(235, 216, 9),rgb(202, 60, 134));
}

but CSS not showing in image just white color.

Developer technologies | .NET | .NET CLI
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Castorix31 91,406 Reputation points
    2021-09-03T15:24:00.507+00:00

    It works if I add at the beginning of the HTML source : (remove space after < (I cannot copy-paste correctly...))

    < meta http-equiv="X-UA-Compatible" content="IE=edge">

    129156-css-in-webbrowser.jpg

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.