首页 文章

Visual Studio 2015中的一些警告使用HTML5,CSS3和razor

提问于
浏览
0

为什么在下面的代码中给Visual Studio Professional 2015这个警告?我没有看到任何问题 .

元素'按钮'需要结束标记 . (在第一行)结束标记缺少匹配的开始标记 . (在最后一行)验证(CSS 3.0):“flex”不是“position”属性的有效值 . (在flex的第二行)

<button type="submit" class="btn btn-default flex-button external-authentication" 
        id="@p.AuthenticationType" style="position: flex;" name="provider" 
        value="@p.AuthenticationType" title="Meld u aan met uw @p.Caption account">
    <p>
        <span class="fa-stack fa-lg fa-2x" style="color: @kleur;">
            <span class="fa fa-square fa-stack-2x">
            <span class="@icon fa-stack-1x fa-inverse">
        </span>
    </p>
</button>

我的解决方案中的代码与您在此处看到的代码之间的代码没有更改 .

1 回答

  • 0

    我是通过@Alohci评论发现的 . 他或她说:

    按钮元素不能包含p元素 . flex是display属性的值,而不是position属性 .

相关问题