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.

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
336 questions
C#
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.
10,914 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 85,131 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 Answers by the question author, which helps users to know the answer solved the author's problem.