How Can I Solve the Background Color Filling Error of the richtext Component

Search This thread

riteshchanchal

Senior Member
Jun 24, 2020
73
56

Symptom​

When the richtext component is used to display web page content, a white border appears, which affects the overall display effect.
The abnormal effect is as follows.

1617080922343.png



Cause Analysis​

After the richtext component contains HTML content, the value of background-color set through a class in the quick app does not take effect. If the richtext component contains only the body of the web page, a white border is displayed around the richtext content even if the background color is set for the body. Complete HTML texts need to be written in richtext, and the background color needs to be set for the HTML tag. Then, the background color can cover the border, and the white border does not appear.

Solution​

Add a complete HTML page to richtext, and set the background color to cover the white border in the HTML tag.

The optimized display effect is as follows.

5190044000025801232.20210224011529.86128843665452413475724318580923:50520329045401:2800:A5EA67C51C211C054E0E41E8595FE18A34A334004CE0DAA4902632C24961EEC3.jpg



Read full article in Huawei forum
 

Attachments

  • 1617080755393.png
    1617080755393.png
    49.3 KB · Views: 0
  • 1617080769437.png
    1617080769437.png
    49.3 KB · Views: 0