2012-05-23 92 views
2

我在MVC 4项目中使用Twitter的Bootstrap,它基本上可以工作,但是样式已关闭。例如,这是一种酥料饼应该是什么样子:ASP.NET MVC 4 - Twitter Bootstrap渲染问题

enter image description here

然而,按钮呈现不正确:

enter image description here

和酥料饼的箭头没有正确对齐:

enter image description here

关于可能会发生什么的任何想法G?这里是我的.cshtml文件:

<link href="@Url.Content("~/Content/bootstrap.css")" rel="stylesheet" type="text/css"/> 
<script src="@Url.Content("~/Scripts/bootstrap.js")"></script> 

<div class="well"> 
<a href="#" id="example" class="btn btn-danger" rel="popover" data-original-title="Twitter Bootstrap Popover">hover for popover</a> 
</div> 

<script> 
    $(function() { 
     $("#example").popover(); 
    }); 
</script> 

回答

3

找到了答案..这是由于使用默认的site.css文件CSS冲突。 body有一个10px的顶部边框,这导致了popover的不对齐 另外,我将<a更改为<button,并且按钮正确呈现。