本文介绍了是绝对定位的最佳实践或者我应该避免呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看ASP.NET学习视频
它是显示您可以将使用绝对定位在页面上的控件。我只是想知道如果这是一个最好的做法还是应该避免绝对定位?这似乎是一个不错的,简单的功能,但必须有某种原因,它不会被默认在VS IDE中选择。

I am watching the ASP.NET learn video on http://www.asp.net/learn/3.5-videos/video-13.aspxand it is showing you can place controls on a page using Absolute positioning. I am just wondering if this is a best practice or should I avoid Absolute positioning? It seems like a nice, easy feature, but there must be some reason why it is not selected by default in the VS IDE.

推荐答案

许多用户通过配置其浏览器设置更改网页的字体大小。如果您使用绝对定位,事情会不会对他们右对齐。

Many users change the font size of your page by configuring their browser settings. If you use absolute positioning, things will not align right for them.

在绝对定位,当你的网页变得更加复杂,单一的设计决策,需要用户重新定位所有的元素,但在相对定位,你只需要改变一个值,而所有其他元素也将相应调整

In absolute positioning, when your page gets more complex, a single design decision would require you to reposition all of the elements, but in relative positioning, you would only need to change one value, and all the other elements would adjust accordingly.

这篇关于是绝对定位的最佳实践或者我应该避免呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 23:20