Insert your External CSS <Style> tag in Costom webview

if you want to insert your own CSS style in any webpage in custom webview then you can use this code in Evaluate Js
component_method

var divNode = document.createElement("div");
divNode.innerHTML = "<br><style>h1 { color:Red; margin:16px;}</style>";
document.body.appendChild(divNode);

just write your css code between <style> and </style>

you can hide any component or element by the property display:none;

2 Likes