I am using this method to convert opaque rendering mode to transparent.
item.color = new Color(1, 1, 1, value);
item.SetFloat("_Mode",3);
item.SetOverrideTag("RenderType", "Transparent");
item.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
item.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
item.SetInt("_ZWrite", 0);
item.DisableKeyword("_ALPHATEST_ON");
item.DisableKeyword("_ALPHABLEND_ON");
item.EnableKeyword("_ALPHAPREMULTIPLY_ON");
item.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
This is working fine but not working in my webgl build.