C# WebBrowser Gmail Ads

别说谁变了你拦得住时间么 提交于 2019-12-11 06:27:28

问题


I am creating a C# application that displays the google online applications, specifically Gmail in this situation. All is going well except that I do not know how to hide the ads that plugins that Firefox and Chrome have.

Anyone have any suggestions how I programmatically hide ads like the Firefox/Chrome plugins do?


回答1:


Insert a CSS rule into the page with lists of the ads, and make the display:none;

Example:

<style type="text/css">
.classname,.anotherclassname,#idname{
display:none;
}
</style>


来源:https://stackoverflow.com/questions/5195687/c-sharp-webbrowser-gmail-ads

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!