简体   繁体   English

如何在Visual Studio中更正CSS格式问题

[英]How to correct CSS formatting problem in Visual Studio

I've developed a webpage in visual studio, but whenever I open the page in "view in browser" the formatting is skewed (I used line-height attribute, but it didn't work. Please see sample). 我已经在Visual Studio中开发了一个网页,但是每当我在“在浏览器中查看”中打开该页面时,格式就会发生偏差(我使用了line-height属性,但没有用。请参见示例)。 Yet whenever I upload the site to a real server, the formatting is correct again. 但是,每当我将站点上载到真实服务器时,格式再次正确。 Does that mean I need to install IIS to view the site properly? 这是否意味着我需要安装IIS才能正确查看站点? Thanks! 谢谢!

Sample 样品

http://i1230.photobucket.com/albums/ee495/hkingdev/page.jpg http://i1230.photobucket.com/albums/ee495/hkingdev/page.jpg

No, this is not directly related to Visual Studio. 不,这与Visual Studio没有直接关系。 It may just mean there is a problem with your layout. 这可能只是意味着您的布局存在问题。

You should be testing all your pages in all of the major browsers. 您应该在所有主要的浏览器中测试所有页面。 If they all work, then I wouldn't worry about it. 如果它们都起作用,那么我就不用担心。 But I suspect some browsers may have problems formatting your page. 但是我怀疑某些浏览器可能无法格式化您的页面。

And if you are using a different browser to preview your site than you are using to view it on the server, then that's your answer. 而且,如果您使用与在服务器上查看网站不同的浏览器来预览网站,那么这就是您的答案。 You need to test with all major browsers. 您需要使用所有主要的浏览器进行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CSS编辑器中选择的Visual Studio格式无法正常工作 - Visual studio formatting of selection in CSS editor not working Visual Studio 代码 CSS 缩进和格式化 - Visual studio code CSS indentation and formatting CSS格式在Visual Studio 2013中不可用 - CSS Formatting not available in Visual Studio 2013 Visual Studio以我不想要的方式格式化我的CSS / LESS,如何将其关闭? - Visual Studio is formatting my CSS/LESS in the way I don't want, how to turn it off? 如何防止 Visual Studio 2019 在粘贴时将 CSS 格式化为多行? - How to prevent Visual Studio 2019 from formatting CSS as multi-line on paste? Visual Studio.Net的“绝对定位”有什么问题,CSS的“绝对定位”如何解决这个问题? - What is the problem with Visual Studio.Net's “absolute positioning”, and how is that problem fixed by CSS's “absolute positioning”? visual studio中的自定义格式文档选项。 格式化CSS标记 - Custom format document option in visual studio. Formatting CSS tags Visual Studio Advanced CSS格式从紧凑扩展到扩展 - Visual Studio Advanced CSS Formatting Beyond Compact to Expanded 正确的CSS格式 - Correct CSS formatting 如何解决CSS中的这种(看似简单的)格式化问题? - How to solve this (seemingly simple) formatting problem in CSS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM