ASP.Net Web窗体引导CSS被用户代理样式表CSS覆盖 [英] ASP.Net Web Forms Bootstrap CSS Being Overwritten By User Agent Stylesheet CSS

查看:92
本文介绍了ASP.Net Web窗体引导CSS被用户代理样式表CSS覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Bootstrap开发了一个小型的ASP.Net Web Forms响应式网站。在开发服务器上运行它可以正常工作。但是在将其发布到托管服务器之后,CSS并未在所有实例中正确呈现。



问题在于以下DIV并且丢失了填充

I've developed a small ASP.Net Web Forms responsive website using Bootstrap. Running it on the development server works OK. But after publishing it to the hosting server, the CSS is not being rendered correctly in all instances.

The problem is with the following DIV and losing its padding

<div class="container-fluid"> 



在Google Chrome中使用Inspect Element时,来自开发服务器的CSS是明确说明的来自BootstrapCSS:


When using Inspect Element in Google chrome, the CSS from the dev server is and it clearly states its from BootstrapCSS:

.container-fluid {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}



在托管服务器上执行相同操作会得到以下内容并说明其用户代理样式表。


Doing the same on the hosted server gives the following and states its a User Agent Stylesheet.

div {
display: block;
}





有任何建议可能是什么问题?



干杯。



John



Any suggestions what the problem may be ?

Cheers.

John

推荐答案

用户代理是您的浏览器。禁用它。

http:/ /stackoverflow.com/questions/18006356/chrome-how-to-turn-off-user-agent-stylesheet-settings [ ^ ]
User Agent is your browser. Disable it.
http://stackoverflow.com/questions/18006356/chrome-how-to-turn-off-user-agent-stylesheet-settings[^]


这篇关于ASP.Net Web窗体引导CSS被用户代理样式表CSS覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆