如何在 CefSharp.LoadHtml 中添加超链接?

How do you add hyperlinks in CefSharp.LoadHtml?

这个问题现在有了解决方案,下面是对我有用的代码:

chrome.LoadHtml(@"<html>
        <center><h1>New tab</h1></center>
        <center><a href=""https://youtube.com"">YouTube</a>, </center>
        <center><a href=""https://google.com"">Google</a></center>
        <center><a href=""https://github.com"">Github</a></center>
    </html>");

如何在 CefSharp.LoadHtml 中添加 hyperlinks?我一直在 Visual Studio 2017 中收到语法错误,',',在 link 添加逗号后,例如 youtube.com,仍然无法正常工作,所以我尝试了 https:// 和令我惊讶的是,它在评论之后做出了一切。我做了一些研究,目前似乎没有其他人遇到这个问题。

我是 CefSharp 的新手,阅读了互联网上的一些教程。 这是我正在尝试做的新标签页。

chrome.LoadHtml("<html><center><h1>New tab</h1></center><center><a href="youtube.com">YouTube</a>, </center><center><a href="google.com">Google</a></center><center><a href="github.com">Github</a></center></html>");

尝试这样的事情:

chrome.LoadHtml(
    @"<html>
        <center><h1>New tab</h1></center>
        <center><a href=""https://youtube.com"">YouTube</a></center>
        <center><a href=""https://google.com"">Google</a></center>
        <center><a href=""https://github.com"">Github</a></center>
    </html>");

它使用 Verbatim String Literal,它允许您按照自然意图使用多行标记。双引号是 VSL 转义双引号的方式。