如何在Razor视图中实现<i>标记类的变量

用户名

我正在尝试使用超棒的字体添加图标。我使用了自举按钮类型,并且工作正常。但是当我想使用标签添加社交图标时,它似乎没有。我该怎么做?

   <div id="socialLoginList">
                <p>
                @foreach (AuthenticationDescription p in loginProviders)
                {
                    <button type="submit" class="btn btn-lg btn-social [email protected]()" id="btn-socialID" name="provider" value="@p.AuthenticationType" title="Log in using your @p.Caption account"><i class="fa [email protected]"></i>@p.AuthenticationType</button><br /><br />
                }
                </p>
            </div>
恶作剧

只需在ToLower这里做一个

<i class="fa [email protected]()">

字体很棒的图标都是小写字母,因此如果执行,它应该将它们选中ToLower请记住,HTML类名称区分大小写

例如

<i class="fa fa-google"></i>
<i class="fa fa-facebook"></i>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章